Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In the statistical treatment of data one often needs to compute the quantities x

ID: 3201427 • Letter: I

Question


In the statistical treatment of data one often needs to compute the quantities x = 1/n sigma_i = 1^n x_i, s^2 = 1/n sigma_i = 1^n (x_i - x)^2, where x_1, x_2,.......,x_n are the given data. Assume that n is large, say, n + 10,000. lt is easy to see that s^2 can also be written as s^2 = 1/n sigma_i = 1^n x_i^2 - x^2. Which of the two methods to calculate s62 is cheaper in terms of overall computational cost? Assume x has already been calculated and give the operation counts for these two options. Which of the two methods is expected to give more accurate results for s^2 in general? Give a small example, using a decimal system with precision t = 2 and numbers of your choice, to validate your claims.

Explanation / Answer

a)the second result would be cheaper as number of computation will be smaller into that.

in first method first we calculate mean, then reduce mean with each individual variable , and then square it.

in second we take the mean , sqaure each individual and reduce only once. hence second one is better in relation to computation

b) both of them will provide then same result as second one is derived from first one.,

c) we take random sample of 10 digits.

from first formula s2 =(1/10)*10.1 =1.01

from second formula s2 =(1/10)*(291) -(5.3)2 =29.1-28.09 =1.01

hence both of them does provide the same solution,

X (X-Xbar)^2 x^2 5 0.09 25 5 0.09 25 7 2.89 49 4 1.69 16 6 0.49 36 5 0.09 25 4 1.69 16 5 0.09 25 5 0.09 25 7 2.89 49 53 10.1 291 5.3