Browse Source

1st Stats Projects

content-update
OGordoo 3 years ago committed by Christopher Fremond
parent
commit
45a9e12224
  1. 76
      subjects/guess-it-1/README.md
  2. 21
      subjects/guess-it-1/audit/README.md
  3. 76
      subjects/guess-it-2/README.md
  4. 25
      subjects/guess-it-2/audit/README.md
  5. 46
      subjects/linear-stats/README.md
  6. 19
      subjects/linear-stats/audit/README.md
  7. 55
      subjects/math-skills/README.md
  8. 17
      subjects/math-skills/audit/README.md

76
subjects/guess-it-1/README.md

@ -0,0 +1,76 @@
## guess-it-1
### Objectives
Now that you have the math skills up and running , it is time for you to guess numbers. Find a way to implement the `math-skills` exercise into this one.
### Instructions
That is right, you must build a program that given a number as standard input, prints out a range in which the next number provided should be.
The data received by the program, as always, will be presented as the following example:
```console
189
113
121
114
145
110
...
```
This data represents a graph in which the values of the x axis are the number of the lines (0, 1, 2, 3, 4, 5 ...) and the values of the y axis are the actual numbers (189, 113, 121, 114, 145, 110...).
Each of the numbers will be your standard input and the purpose of your program is for you to find the range in which the next number will be in.
This range should have a space separating the lower limit from the upper one like in the example:
```console
>$ ./your_program
189 --> the standard input
120 200 --> the range for the next input, in this case for the number 113
113 --> the standard input
160 230 --> the range for the next input, in this case for the number 121
121 --> the standard input
110 140 --> the range for the next input, in this case for the number 114
114 --> the standard input
100 200 --> the range for the next input, in this case for the number 145
145 --> the standard input
1 99 --> the range for the next input, in this case for the number 110
110 --> the standard input
100 150 --> the range for the next input, in this case for the number
145
...
```
As you can see, some of the ranges are not correct and some are bigger than others. But this is just an example, if you want you can give a specific range in your program, that is fully up to you to decide. The intent of this exercise is for you to use the calculations you did in the `math-skills` exercise to guess the numbers.
### Testing
Your program will be extensively tested, so performance should be prioritized. Talking about testing, here is how it will work.
If you guess correctly the range for the next given number, your score will be incremented based on the size of your range. In other words, the bigger your range is, the smaller your score will be. So my advice is for you to find the perfect balance between a small range and a good guess.
So that auditors can test your program, you will have to follow the next steps:
- create a folder called **`student`**
- copy the files that are needed to run your program into this folder
- write an **executable** shell script named `script.sh` containing the command(s) to run your program, **from the root folder of the provided tester** (see below where to find it)
Here is a following example of the script, assuming that the program is called `solution` and was written in JS(Javascript):
```sh
#!/bin/sh
# We assume that we are on the root folder, so we have to enter the
# student folder in order to run the `solution.js` file
node ./student/solution.js
```
You can choose in which language you want to build your program.
If you fail one of this steps, the test will not work. So we advise you to run the test by downloading [this zip file](https://assets.01-edu.org/guess-the-number.zip) containing the tester. You should place the `student/` folder in the root directory of the items provided and read its instructions. The data sets used to test this exercise will be `Data 1`, `Data 2` and `Data 3`.
This project will help you learn about:
- Statistical and Probabilities Calculations
- Scripting

21
subjects/guess-it-1/audit/README.md

@ -0,0 +1,21 @@
#### Functional
##### After downloading [this zip file](https://assets.01-edu.org/guess-the-number.zip) containing a tester, follow its instructions (present in the README) in order to test the student program against the `big-range` program 3 times using the `Data 1`.
###### Did the student won against `big-range` most of the times?
##### Try running the student program against the `big-range` program, using `Data 2` and then `Data 3` 3 times each.
##### Try running the student program against the `average` program, using `Data 1`, `Data 2` and `Data 3` 3 times each.
###### Did the student won against `average` most of the times?
##### Try running the student program against the `median` program, using `Data 1`, `Data 2` and `Data 3` 3 times each.
###### Did the student won against `median` most of the times?
#### Bonus
##### Try running the student program against the `nic` program, using `Data 1`, `Data 2` and `Data 3` 3 times each.
###### +Did the student won against `nic` most of the times?

76
subjects/guess-it-2/README.md

@ -0,0 +1,76 @@
## guess-it-2
### Objectives
Now that you have even more statistical knowledge, you will guess even more numbers. This time will be a bit harder.
### Instructions
That is right, you must build a program that given a number as standard input, prints out a range in which the next number provided should be, just like last time.
The data received by the program, as always, will be presented as the following example:
```console
189
113
121
114
145
110
...
```
This data represents a graph in which the values of the x axis are the number of the lines (0, 1, 2, 3, 4, 5 ...) and the values of the y axis are the actual numbers (189, 113, 121, 114, 145, 110...).
Each of the numbers will be your standard input and the purpose of your program is for you to find the range in which the next number will be in.
This range should have a space separating the lower limit from the upper one like in the example:
```console
>$ ./your_program
189 --> standard input
120 200 --> range for the next input, in this case for the number 113
113 --> standard input
160 230 --> range for the next input, in this case for the number 121
121 --> standard input
110 140 --> range for the next input, in this case for the number 114
114 --> standard input
100 200 --> range for the next input, in this case for the number 145
145 --> standard input
1 99 --> range for the next input, in this case for the number 110
110 --> standard input
100 150 --> range for the next input, in this case for the number 145
145 --> standard input
...
```
As you can see, some of the ranges are not correct and some are bigger than others. But this is just an example, if you want you can give a specific range in your program, that is fully up to you to decide. The intent of this exercise is for you to use the calculations you did in the previous exercise (`linear_stats`) to guess the numbers.
### Testing
Your program will be extensively tested, so performance should be prioritized. Talking about testing, here is how it will work.
If you guess correctly the range for the next given number, your score will be incremented based on the size of your range. In other words, the bigger your range is, the smaller your score will be. So my advice is for you to find the perfect balance between a small range and a good guess.
So that auditors can test your program, you will have to follow the next steps:
- create a folder called **`student`**
- copy the files that are needed to run your program into this folder
- write an **executable** shell script named `script.sh` containing the command(s) to run your program, **from the root folder of the provided tester** (see below where to find it)
Here is a following example of the script, assuming that the program is called `solution` and was written in JS(Javascript):
```sh
#!/bin/sh
# We assume that we are on the root folder, so we have to enter the
# student folder in order to run the `solution.js` file
node ./student/solution.js
```
You can choose in which language you want to build your program.
If you fail one of this steps, the test will not work. So we advise you to run the test by downloading [this zip file](https://assets.01-edu.org/guess-the-number.zip) containing the tester. You should place the `student/` folder in the root directory of the items provided and read its instructions. The data sets used to test this exercise will be `Data 5` and `Data 6`.
This project will help you learn about:
- Statistical and Probabilities Calculations
- Scripting

25
subjects/guess-it-2/audit/README.md

@ -0,0 +1,25 @@
#### Functional
##### After downloading [this zip file](https://assets.01-edu.org/guess-the-number.zip) containing a tester, follow its instructions (present in the README) in order to test the student program against the `big-range` program 3 times using the `Data 4`.
###### Did the student won against `big-range` most of the times?
##### Try running the student program against the `big-range` program, using `Data 5` 3 times each.
##### Try running the student program against the `linear-regr` program, using `Data 4` and `Data 5` 3 times each.
###### Did the student won against `linear-regr` most of the times?
##### Try running the student program against the `correlation-coef` program, using `Data 4` and `Data 5` 3 times each.
###### Did the student won against `correlation-coef` most of the times?
#### Bonus
##### +Try running the student program against the `mse` program, using `Data 4` and `Data 5` 3 times each.
###### +Did the student won against `mse` most of the times?
##### +Try running the student program against the `nic` program, using `Data 4` and `Data 5` 3 times each.
###### +Did the student won against `nic` most of the times?

46
subjects/linear-stats/README.md

@ -0,0 +1,46 @@
## linear-stats
This time, like in the first exercise, you will have to build a program that prints various statistical calculations. Now you will focus on the `Linear Regression Line` and the `Pearson Correlation Coefficent`.
### Instructions
Your program must be able to read from a file and print the result of each statistic mentioned above. In other words your program must be able to read the data present in the path passed as argument. The data in the file will be presented as the following example:
```console
189
113
121
114
145
110
...
```
This data represents a graph in which the values of the x axis are the number of the lines (0, 1, 2, 3, 4, 5 ...) and the values of the y axis are the actual numbers (189, 113, 121, 114, 145, 110...).
To run your program will be used a command similar to this one if your project is made in Go:
```sh
>$ go run your-program.go data.txt
```
After reading the file, your program should print the `Linear Regression Line` and the `Pearson Correlation Coefficient` in the following format:
```console
Linear Regression Line: y = <value>x + <value>
Pearson Correlation Coefficient: <value>
```
The values in between the single angle quotation marks (`< >`) should be a decimal number. The values for the `Linear Regression Line` should have 6 decimal places, while the `Pearson Correlation Coefficient` value should have 10 decimal places.
#### Testing
Your program will be tested by an auditer who will run a program provided by us, that creates a random data set of numbers and prints the result. The auditer job is to compare how your program performed.
You can choose in which language you want to build your program.
This program will help you learn about:
- Statistical and Probabilities Calculations
- [Linear Regression Line](https://en.wikipedia.org/wiki/Linear_regression)
- [Pearson Correlation Coefficient](https://en.wikipedia.org/wiki/Pearson_correlation_coefficient)

19
subjects/linear-stats/audit/README.md

@ -0,0 +1,19 @@
#### Functional
##### After downloading the [file](https://assets.01-edu.org/stats-projects/linear-stats) and giving executable permissions, run the script with `./linear-stats` and then run the program of the student with the created `data.txt` by the previous command.
###### Are the outputs of both programs (the one provided and the student one) in the same format?
###### In the output of the student program, did the values on the Linear Regression Line contain 6 decimal places?
###### In the output of the student program, did the values on the Pearson Correlation Coefficient contain 10 decimal places?
###### Did the values of both programs match?
##### Do the same procedure (running the script provided and the student program) 3 more times in order to test new data sets.
###### Did the values of both programs match in all tries?
#### Bonus
###### +Did the student provided a README with explanation on how to test his/her program?

55
subjects/math-skills/README.md

@ -0,0 +1,55 @@
## math-skills
### Objectives
The purpose of this project is for you to calculate the following:
- Average
- Standard Deviation
- Variance
- Median
### Instructions
Your program must be able to read from a file and print the result of each statistic mentioned above. In other words your program must be able to read the data present in the path passed as argument. The data in the file will be presented as the following example:
```console
189
113
121
114
145
110
...
```
This data represents a graph in which the values of the x axis are the number of the lines (0, 1, 2, 3, 4, 5 ...) and the values of the y axis are the actual numbers (189, 113, 121, 114, 145, 110...).
To run your program will be used a command similar to this one if your project is made in Go:
```sh
>$ go run your-program.go data.txt
```
After reading the file, your program must execute each of the calculations asked above and print the results in the following manner (the following numbers are only examples):
```console
Average: 35
Standard Deviation: 65
Variance: 5
Median: 4
```
### Testing
Your program will be tested by an auditer who will run a program provided by us, that creates a random data set of numbers and prints the result. The auditer job is to compare how your program performed.
You can choose in which language you want to build your program.
This project will help you learn about:
- Statistics and Mathematics
- [Average](https://en.wikipedia.org/wiki/Average)
- [Standard Deviation](https://en.wikipedia.org/wiki/Standard_deviation)
- [Variance](https://en.wikipedia.org/wiki/Variance)
- [Median](https://en.wikipedia.org/wiki/Median)

17
subjects/math-skills/audit/README.md

@ -0,0 +1,17 @@
#### Functional
##### After downloading the [file](https://assets.01-edu.org/stats-projects/math-skills) and giving executable permissions, run the script with `./math-skills` and then run the program of the student with the created `data.txt` by the previous command.
###### Are the outputs of both programs (the one provided and the student one) in the same format?
###### In the output of the student program, are the data types of the values integers?
###### Did the values of both programs match?
##### Do the same procedure (running the script provided and the student program) 3 more times in order to test new data sets.
###### Did the values of both programs match in all tries?
#### Bonus
###### +Did the student provided a README with explanation on how to test his/her program?
Loading…
Cancel
Save