Variance function with Pointers. The variance is a measure of how spread out a d
ID: 3619826 • Letter: V
Question
Variance function with Pointers. The variance is a measure of how spread out a distribution is. It is computed as the average squared deviation of each number from its mean. For example, for the numbers 1,2, and 3, the mean is 2 and the variance is: sigma 2 = ( 1 - 2 ) 2 + ( 2 - 2 ) 2 + ( 3 - 2 ) 2 = 0.667 The formula ( in summation notation ) for the variance in a population is sigma 2 = 1 / n E n n = 1 ( x ( i ) - mu ) 2 where mu is the mean and n is the number of scores. main function ( 15 pts ) Declare and initialize array x with 1.0,2.0, and 3.0. Call function sta and print the results. sta function ( 20 pts ) Write a void function called sta. which should produce the mean and the variance as the results of the set of data stored in the array x. These data will be inputted by the calling function ( i.e. main ) to the function sta as arguments. Use pointers to return the two results ( i.e., mean and variance ) simultaneously, remember that function sta is void.Explanation / Answer
please rate - thanksRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.