Question 1
For the input file containing the following numbers:-
10
12
16
15
19
29
32
2
5
The mean value is 15.5555
The variance is 100.277779
Note: The mean is obtained by adding all the numbers together and dividing by the number of values.
The variance is obtained, by taking each input value, subtracting the mean, squaring this and adding this together for all the values. Then divide the total result by the number of values minus one.
Back to Main Page for Lecture 8 |