Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Exercises on manipulating means and standard deviations Lily Yen Due January 12th, 2015 1. Show that for any data set {xi }ni=1 , a. n X (xi − x̄) = 0. i=1 b. s2 = n X 1 1 x2i − n − 1 i=1 n n X !2 xi . i=1 P P Solution a. Consider that ni=1 xi = nx̄. Therefore ni=1 (xi − x̄) = Pn 1. P n i=1 xi − i=1 x̄ = nx̄ − nx̄ = 0. b. Since n X (xi − x̄)2 = i=1 n X (x2i − 2xi x̄ + x̄2 ) = i=1 = n X = i=1 = n X x2i − 2x̄ n X n X xi + i=1 n X x̄2 i=1 xi + nx̄2 i=1 2 x2i − n x2i − i=1 it follows that s2 = x2i − 2x̄ i=1 i=1 n X n X 1 n−1 1 n n X !2 xi i=1 n X 1 + n n X !2 xi i=1 !2 xi , i=1 Pn 2 i=1 (xi − x̄) = 1 1 n−1 P n i=1 x2i − 1 n P 2 ( ni=1 xi ) . 2. Prove that if a data set {xi }ni=1 has mean x̄ and standard deviation sx , then a. if yi = xi + h, then ȳ = x̄ + h and sy = sx ; b. if yi = cxi , then ȳ = cx̄ and sy = csx ; c. if zi = xi −x̄ , sx Solution 2. and then z̄ = 0 and sz = 1. a. ȳ = 1 n Pn i=1 yi = 1 n Pn i=1 (xi +h) n s2y = 1 n Pn i=1 xi + n1 n h = x̄+h n 1 X 1 X (yi − ȳ)2 = (xi + h − (x̄ + h))2 = n − 1 i=1 n − 1 i=1 n 1 X = (xi − x̄)2 = s2x , n − 1 i=1 so sy = sx . P b. ȳ = n1 ni=1 yi = 1 n Pn i=1 cxi = c n1 Pn n s2y i=1 xi = cx̄, and n 1 X 1 X = (yi − ȳ)2 = (cxi − cx̄)2 n − 1 i=1 n − 1 i=1 n = n 1 X 2 1 X c (xi − x̄)2 = c2 (xi − x̄)2 = c2 s2x , n − 1 i=1 n − 1 i=1 so sy = csx . c. This follows immediately from the previous two parts with h = −x̄ and c = s1x . 3. A sample of 20 resistors yielded a mean value of 44.6 Ω and a standard deviation of 1.3 Ω. a. If one more resistor of 52 Ω is added to the sample, what are the mean and standard deviation of the 21 resistors? b. If the original sample of 20 resistors is combined with a sample of 10 resistors that had a mean of 48.3 Ω and standard deviation of 1.9 Ω, calculate the mean and standard deviation of the combined sample of 30 resistors. 2 Solution Pn3. 1 i=1 n a. Consider first the original n = 20 resistors. Since x̄ = xi , n X xi = nx̄ = 20 · 44.6 Ω = 892 Ω. i=1 2 Moreover, since s = n X x2i i=1 1 n−1 P n i=1 x2i 1 = (n − 1)s + n 2 = 19(1.3 Ω)2 + − 1 n Pn 2 ( i=1 xi ) , it follows that n X !2 xi i=1 1 (892 Ω)2 = 39 815.31 Ω2 . 20 P P 2 Adding the 21st resistor, 21 944 Ω and 21 i=1 = 892 Ω + 52 Ω = P i=1 xi = 21 2 2 1 1 39 815.31 Ω +(52 Ω)2 = 42 519.31 Ω . Thus x̄ = 21 i=1 xi = 21 ·944 Ω = 45.0 Ω and !2 21 21 X X 1 1 1 1 2 2 2 2 s = x − 42 519.31 Ω − (944 Ω) xi = 20 i=1 i 21 i=1 20 21 = 4.21 Ω2 , so s = 2.05 Ω. b. As in the previous part, for the original 20 resistors, 20 X xi = 892 Ω and i=1 20 X x2i = 39 815.31 Ω2 . i=1 In a similar manner, for the sample of 10 resistors, 10 X xi = 10 · 48.3 Ω = 483 Ω i=1 and 10 X i=1 x2i = 9(1.9 Ω)2 + 1 (483 Ω)2 = 23 361.39 Ω2 . 10 3 Therefore, for the combined 30 resistors, 30 X xi = 892 Ω + 483 Ω = 1375 Ω i=1 and 30 X x2i = 39 815.31 Ω2 + 23 361.39 Ω2 = 63 176.7 Ω2 . i=1 P30 1 1 Hence x̄ = 30 i=1 xi = 30 · 1375 Ω = 45.8 Ω and !2 30 30 1 X 1 1 X 2 1 2 2 2 x − xi = 63 176.7 Ω − (1375 Ω) s = 29 i=1 i 30 i=1 29 30 = 5.37 Ω2 , so s = 2.32 Ω. 4