Question: IV.B. STATISTICS To calculate the correlation coefficient for two lists of values X1, T2, . .., In and y1, yz, . . ., yn: Consider

 IV.B. STATISTICS To calculate the correlation coefficient for two lists of
values X1, T2, . .., In and y1, yz, . . .,

IV.B. STATISTICS To calculate the correlation coefficient for two lists of values X1, T2, . .., In and y1, yz, . . ., yn: Consider a list of n real numbers: [1, [2 , . . . , In 1. Calculate the sum of the r; values. 2. Calculate the sum of the r? values. The mean of the values in the list is a real number that is an average, that is, a value that is typical of the values in the list. The mean, here denoted a (pronounced "x-bar"), is calculated as the sum 3. Calculate the sum of the y; values. of all the values in the list, divided by the number of values in the list: 4. Calculate the sum of the yr values 5. Calculate the sum of the ri . yi values. I = Lilli _ Dit x2+ ... + In 6. Calculate the correlation coefficient, using the formula above. n Write a program to calculate the statistics described above, for a pair of lists of 5 values each Note: EL_1 ; is known as summation notation: Etti = 1 + 2 + ... + In (10 values total). The program MUST have the following subsections, in the following order: The bias-corrected sample variance of the list of real numbers, known as the variance for short 1. Greeting Subsection: Greet the user with useful information about the program. and denoted v, is calculated by: 2. Input Subsection a) Prompt the user to input the first list of 5 values. U = Li=1 (Ti - I) (21 - I) + (12 - I) + ... + ( In - I )- b) Input the the first list of 5 values, using a single scanf statement. 2 -1 n - 1 c) Prompt the user to input the second list of 5 values. (d) Input the the second list of 5 values, using a single scanf statement. The bias-corrected standard deviation of the list of real numbers, denoted s, is a real number that 3. Calculation Subsection indicates how typical the mean is. It is calculated by: You MUST do the following calculations IN THE FOLLOWING ORDER: s = Vv (a) Calculate the mean of the first list of 5 values. "b) Calculate the variance of the first list of 5 values. The standard error"* of the list of real numbers, denoted se, is calculated by: c) Calculate the standard deviation of the first list of 5 values. ) Calculate the standard error of the first list of 5 values. Se = - (e) Calculate the mean of the second list of 5 values. (f) Calculate the variance of the second list of 5 values. Now, suppose we have two such lists, each list having n points (that is, the two lists have the same g) Calculate the standard deviation of the second list of 5 values. (h) Calculate the standard error of the second list of 5 values. length): (i) Calculate correlation coefficient of the two lists of 5 values each. (You may precede this calculation with the calculation of partial results, as shown on the previous page.) 1, [2, . . . , In y1, y2, . . . ; yn 4. Output Subsection For two lists that each have n values, the Pearson product-moment correlation coefficient - You MUST output the following values IN THE FOLLOWING ORDER. You MUST CLEARLY LABEL statistics that are based on the first list as coming from the which we'll refer to simply as the correlation coefficient - is a value that represents how closely first list. Likewise, you MUST CLEARLY LABEL statistics that are based on the second related the two lists of values are. list as coming from the second list. For a pair of lists of n values each, the correlation coefficient, denoted Try, is calculated as follows: Note that the correlation coefficient DOESN'T have to be labeled this way, because it's based on both lists. Try n (EL-1 Ti yi) - (Elli) (Ex- yi) (a) Output the first list of 5 values. (b) Output the second list of 5 values. (c) Output the mean of the first list of 5 values. (d) Output the mean of the second list of 5 values. e) Output the variance of the first list of 5 values. (f) Output the variance of the second list of 5 values. (g) Output the standard deviation of the first list of 5 values. http://mathworld. wolfram. com/Variance. html h) Output the standard deviation of the second list of 5 values. http://mathworld. wolfram. com/StandardDeviation. html (i) Output the standard error of the first list of 5 values. **http://mathworld. wolfram.com/StandardError. html (j) Output the standard error of the second list of 5 values. Ithttp://en. wikipedia. org/wiki/Correlation k) Output the correlation coefficient of the two lists of 5 values each. hw07.pdf

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!