/
10/26/2011 rd 1 Probability and Statistics 10/26/2011 rd 1 Probability and Statistics

10/26/2011 rd 1 Probability and Statistics - PowerPoint Presentation

joanne
joanne . @joanne
Follow
66 views
Uploaded On 2023-07-08

10/26/2011 rd 1 Probability and Statistics - PPT Presentation

with Integrated Software Routines Chapter 7 Hypothesis Testing Scenario An old engine gets 27 mpg A sample of 40 new engines were tested and the mean mpg was 29 Should the new engine be installed on the cars in production ID: 1007121

normal test chi sample test normal sample chi reject 100 bar phi hypothesis 250 data square cell interval type

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "10/26/2011 rd 1 Probability and Statisti..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

1. 10/26/2011rd1Probability and Statisticswith Integrated Software Routines Chapter 7 Hypothesis Testing

2. ScenarioAn old engine gets 27 mpg. A sample of 40 new engines were tested and the mean mpg was 29. Should the new engine be installed on the cars in production?Is the sample mean merely higher because of statistical fluctuations? Null hypothesis vs. Alternate hypothesisHo:   27 vs. H1:  > 2710/26/2011rd2

3. 10/26/2011rd3Hypothesis TestingUse sample data statistics to evaluate credibility of hypotheses about population parameters.Null hypothesis H0 predicts the effect of the sample data is due only to random variation.Alternative hypothesis H1 predicts the effect is real and represents the whole population (upper, lower or two-tailed).Example: H0:  = 0 vs. H1:   0 (two-tailed) Based on: Easier to prove something is false than true.

4. Null and Alternative HypothesesH0:  = 0 vs. H1:   0Reject H0 in favor of H1 (sufficient evidence)Fail to reject H0 (insufficient evidence)Jury TrialH0: Defendant is innocent (presumed)H1: Defendant is guilty (beyond a reasonable doubt)Failure to reject the null hypothesis does not imply innocence of the defendant, but insufficient evidence to convict.10/26/2011rd4

5. Steps in Hypothesis Testing1. State H0 and H12. Assume H0 is true.3. Compute appropriate a test statistic (z, t , 2, p etc.)4. State the p-value of the test, which is the observed significance of the data. New Method; State P-value   = risk => Reject H0 Old Method: Reject or Fail to Reject the null P-value measures the plausibility of Ho.10/26/2011rd5

6. 10/26/2011rd6Standard Normal for Hypothesis Testing Consider the structure of the standard normal for hypothesis testing. Z =

7. Two Type ErrorsH0 TrueH0 FalseRejectType ICorrectFail to RejectCorrectType II10/26/2011rd7

8. 10/26/2011rd8ExamplesThe following 10 scores are from N(, 144). 90 78 84 93 99 54 71 77 85 74 (x-bar = 80.5) Test H0:  = 75 vs. H1:   75 at a = 5%. p-value = 14.7%z = (80.5 – 75)/12 = 1.4494 < 1.96 => Cannot Rejectb) Test H0:  = 85 vs. H1:  =  85 at a = 5%. p-value = 23.6% z = (80.5 – 85)/12 = -1.186 > -1.96 => Cannot Rejectc) Test H0:  = 88 vs. H1:  =  88 at  = 5%. p-value = 4.8% z = (80.5 – 88)/12 = -1.9764 < -1.96 => Reject

9. ExampleTest H0 = 5 vs. H1  5Given x-bar = 5.3 and σx-bar = 0.1 from a large number of independent measurements. Find the p-value. Repeat for x-bar = 5.2 and for x-bar = 4.8.(U-normal 5 0.01 5.3)  0.00135. 5 5.2p-value = 2 * 0.00135 = 0.0027 (* 2 (U-normal 5 0.01 5.2))  0.0455 (2 SD above 5)(* 2 (L-normal 5 0.01 4.8))  0.0455 (2 SD below 5)(del-normal 5 0.01 4.8 5.2)  0.954510/26/2011rd9

10. 10/26/2011rd10Various PhrasingsType I error is rejecting a true H0; Type II is failing to reject a false H0; accepting false H0;  Power is probability of rejecting a false H0; (1 – )Usually state H0 as Treatment will have no effect.Alternative hypothesis then becomes researcher's hypothesis in that Happiness is rejecting the H0.

11. 10/26/2011rd11Can you make a Type II error by rejecting H0 ? NoWhat is the risk of committing a Type I error? What is level of significance and who specifies it? 1 -  or Define the Critical region, aka Rejection regionIf H0 is rejected when  = 5%, will it also be rejected at  = 1%? 6%? Not necessarily; YesJoe sets  at 10% and Jane sets  at 5%. In the long run who makes more Type I errors? JoeDefine standard deviation and standard error. X -  - 

12. Hypothesis TestingDefine .If H0 is rejected when  is 0.05, will it also be at  = 0.01?What is the critical region? How is it used? 0.95 0.99Joe typically sets  at 10% while Jane sets  at 5%. In the long run who will make more Type I errors?A Type I error is rejecting a true H0. A Type II error is failing to reject a false H0. Power is the probability of correctly rejecting a false H0.10/26/2011rd12

13. Formulating the HypothesesAnswer the QuestionTesting strength of a cable higher than 50 is acceptable. 50 or below is not. reject1. H0:   50 vs. H1:  < 50 (incorrect)If rejected, one won't use. If accepted, maybe, maybe not   50. 50 reject2. H0:   50 vs.  > 50 (correct)Equality always goes with H0.In # 1 above, it makes no sense to test because if rejected, wont use, and if not rejected, still wont use. 5010/26/2011rd13

14. Hypothesis StatementsShould we state H0 = 50 or H0  50? In the latter, rejecting H0 is rejecting all values above 50, while in the former, rejecting the H0 seems to imply rejecting the value 50 only.10/26/2011rd14

15. 10/26/2011rd15

16. T-distributionThe Student-t distribution is a ratio of a standard normal distribution and the square root of a 2 distribution divided by its degrees of freedom. t = 10/26/2011rd16

17. P-ValueH0: p <= 0.1 vs. H1 : p > 0.1Binomial test with  = 0.0001, n = 20  = P(reject H0 if <= 8 | p = 0.1) where np = 20(0.1) = 2(cbinomial 20 0.1 8)  0.99994 6.002188e-5(cbinomial 20 0.1 9)  0.999993 6.973743e-6We are willing to tolerate 1 chance in 7M10/26/2011rd17

18. 10/26/2011rd18Reliability of a certain part is N(10, 16). A change reflects 36 new parts at = 11.4. Do the new parts have a significantly higher mean when tested at a = 2.5%? With n = 25?H0 :  = 10 vs.  > 10 (upper tail test)Test Statistic: > 1.96 => Reject, p-value = 1.8%; (U-normal 10 16/36 11.4)  0.01786 Test significance for n = 25. < 1.96 => Cannot Reject; p-value = 4%. (phi -1.75)  0.04

19. Phi & Inv-Phi(phi z)  p probability(inv-phi p)  z-value(phi 1.96)  0.975 probability(inv-phi 0.975)  1.96(phi -1.96)  0.025(inv-phi 0.025)  -1.96 10/26/2011rd19

20. Hypothesis TestingConfidence Interval H0:  = 40 vs. H1:   40X-bar = 38.518 with n = 30 and s = 2.299. Test Ho and report p-value and write a 99% confidence interval for .t = 301/2(38.518 – 40)/2.299 = -3.531 < - 2.756 => Rejectp-value = (* 2 (tee 29 3.531))  0.0014 < 0.0199% Confidence Interval: 38.518  2.756 * 2.299/(30)1/2 (37.36, 39.67) and 40 is not in Interval.More informative since Rejection is called for all 's outside10/26/2011rd20

21. 10/26/2011rd21A drill press depth is set at 2”. A random sample of 100 holes are drilled with mean = 2.005 and  = 0.03. With a = 0.05, can the hypothesis that m = 2 be rejected? H0:  = 2 vs. H1:   2Test Statistic Z = = = 1.67 < z0.975 = 1.96 => Cannot reject; p-value = 0.095 or 9.5% = (* 2 (phi -1.67))2. Given n = 36, = 17, s2 = 9, and a = 0.05 with H0: m = 16 vs. H1: m > 16, can H0 be rejected? Note one-sided test.  Large random sample imply adequate test statistic is the value of  Z = = = 2 > 1.645 = z0.95. (phi -2)  0.0228=> REJECT H0.p-value is 0.0228 = (U-normal 16 9/36 17)

22. 10/26/2011rd223. Compute a 95% confidence for  in Problem 1 and show that the value 2 is in the interval.   2.005  1.96 * 0.03 / 10 = 2.005  0.00588 =>  = 2  (1.999, 2.011).4. Find the probability of a Type II error given n = 36, a = 0.01, s = 4 for testing H0: m = 90 vs. H1: m = 93. We accept H0 if <  + z0.99  / 6 = 90 + 2.33*4/6 = 91.55.  (93) = P( < 91.55 |  = 93) = [6(91.55 - 93)/4)] = 0.0148. Beta error  1.48% = (L-normal 93 16/36 91.55)

23. 10/26/2011rd23H0H1 µ0 + z/n1/2 = µ1 - z/n1/2 µ0 µ1

24. Sample SizeHypothesis TestingConfidence Intervals10/26/2011rd24Sample Size nSample Size nSignificance LevelPower of hypothesis testsConfidence levelLength of interval

25. 10/26/2011rd25Figure 7.5 Beta Operating Curve

26. 10/26/2011rd26 Equate the a rejection region boundary point under the supposition that the null value m = m0 with the same boundary point under the supposition that the true meanm = m1 to derive a formula expressing n as a function of the critical  and  values,  and the hypothesized means. Assume m0< m1. 0 + z/n½ = 1 – z/n½ xcH0H1POWER

27. 10/26/2011rd27The mean breaking strength of a new cable is hypothesized to be 260, whereas the breaking strength of the old cable is normally distributed with mean breaking strength 250 and standard deviation 25. A test is devised so that an  error of 5% and a  error of 10% are acceptable. Determine the sample size for the test.  H0:  = 250 vs. H1:  = 260.  z = z0.05 = -1.645; z = z0.10 = -1.28.  n = = = 53.47 or 54 cables. 

28. 10/26/2011rd28  = 50  = 2.5 50Acceptance Region n a  = 52  =50.5 48.5 < < 51.5 10 0.0578 0.26354 0.89148 < < 52 10 0.0114 0.5000 0.970348.5 < < 51.5 16 0.0164 0.2119 0.9445 < < 52 16 0.0014 0.5000 1(del-normal mu var X1 X2)(del-normal 52 (/ (square 2.5) 16) 48.5 51.5)  0.2118553

29. 10/26/2011rd29Given data, determine if sample could have come from N(5, 4). H0: Sample is from N(5, 4) vs. H1: Sample is not from N(5, 4).Compute 25th and 75th percentiles of N(5, 4), (inv-phi 25)  0.6742P25 = 5 - 2(0.6742) = 3.6516 P75 = 5 + 2(0.6742) = 6.3484(setf data (sort (sim-normal 5 2 32) #' <))) 32 samples(1.66 2.04 2.45 2.77 3.06 3.44 3.52 3.58 3.71 3.98 4.34 4.39 4.66 4.71 5.09 5.2 5.59 5.99 5.99 6.09 6.18 6.34 6.5 6.52 6.6 6.65 6.85 7.07 7.39 7.66 7.89 8.1)Observed 8 6 8 10Expected 8 8 8 8Cell Chi-sq = 0 + 0.5 + 0 + 0.5 = 1(chi-sq-value = 1 df = 3 p-value = 0.801 Expected-values = 8(phi-test mu sigma data)(phi-test 50 10 (sim-normal 50 10 100))Test could be structured for deciles, etc.

30. 10/26/2011rd30 Create a beta operating curve with H0:  = 250 and  = 25.  First determine the acceptance region under H0:  = 250 vs. H1:  > 250 This region is given by   = 250 + 5.56 = 255.6. That is, we cannot reject H0 if our test statistic from our sample of 54 cables is less than or equal to 255.6. We compute P( < 255.6 |  =  = 260) for various values around our new hypothesized mean of 260. We assume that  for the new cable remains 25 and that our sample size is 54. For example, P( < 255.6 |   = 254) =  = 0.681 (normal 254 625/54 255.6)  0.6809

31. 10/26/2011rd31Beta Operating Curve(gen-beta-oc 250 ‘(248 250 252 254 256 258 260) 25 5 54)

32. 10/26/2011rd32To test H0:  = 105 vs. H1:  = 107 with a = 5%,  = 2%, and  = 4, how many observations are needed? (inv-phi 0.05)  1.645 and (inv-phi 0.02)  2.054.

33. Two-sided t-testH0:  = 10.0 vs. H1:   10.0 given data n = 16, x-bar = 10.6 and s = 1.61.t = 4(10.6 – 10)/1.61 = 1.491 => p-value = 2 * 0.078 = 15.6%Fail to reject H0. (* 2 (tee 15 1.491))  0.156785% confidence interval for  is 10.6  1.518 * 1.61/4 or(9.989, 11.211) and we note that 10 is in the interval. Repeat test given x-bar = 11.6t = 4(11.5 – 10)/1.61 = 3.727 => p-value = 2 * 0.001 = 0.2%Reject Ho. Using a Control Group in experimental design10/26/2011rd33

34. 10/26/2011rd34 6. a) Find the p-value when the number of heads from 100 flips of an assumed fair coin is between 40 and 60 inclusive using the normal approximation with continuity correction. a) H0: X = 50 vs. H1: X  50  b) State the decision if  is set at 4%.  c) Find the Type II error if P(heads) = 0.6.   a)  = np = 100*0.5 = 50;  2 = npq = 100*0.5*0.5 = 25 =>  = 5 P(39.5 <= X <= 60.5) = (del-normal 50 25 39.5 60.5)  0.9642711 [(60.5 - 50)/5] - [(39.5 - 50)/5] = 0.9821 - 0.0179 = 0.9643 => p-value = 0.0357.  b) For a set at 4%, the decision is to reject. (p = 0.6) = P(39.5 <= X <= 60.5 | p = 0.6 =>  = 60 and  = 4.899) = (del-normal 60 24 39.5 60.5)  0.5406.c) [(60.5 - 60) / 4.899] - [(39.5 - 60) / 4.899] = 0.5406 - 0.000014 = 0.5406.

35. 10/26/2011rd357. Given x-bar = 2960, s = 36, n = 8, test H0:  ³ 3000 vs. H1:  < 3000 at  = 0.05 when sampling from a normal distribution.  t-statistic: 2.83(2960 - 3000)/36 = -3.14 < -1.895 => p-value  0.0082 => Reject. One-tail test. (t-test 3000 36 8 2960)  (t = -3.14 p-value = 0.01632 2-tail)8. Test H0: 2 £ 0.02 vs. H1: 2 > 0.02 for n = 10, s2 = 0.03,  = 0.05, when sampling from a normal distribution.  2 = (n - 1)S2/2 = 9(0.03)/0.02 = 13.5 < 16.9 = 29, 0.05 => p-value  0.1412 => Cannot Reject.(chi-square 9 13.5)  0.858744 (U-chi-sq 9 13.5)  0.1412; (inv-chi-sq 9 95)  16.9.

36. 10/26/2011rd

37. 10/26/2011rdcw6a-37v = 0.100 = 0.050 = 0.025 = 0.010 = 0.005 13.0786.31412.70631.82163.657 21.8862.9204.3036.6959.925 31.6392.3533.1824.5415.841 41.5332.1322.7763.7474.604 51.4762.0152.5713.3654.032 61.4401.9432.4473.1433.707 71.4151.8952.3652.9983.499 81.3971.8602.3062.8963.355 91.3831.8332.2622.8213.250101.3721.8122.2282.7643.169111.3631.7962.2012.7183.106121.3561.7822.1792.6813.055131.3501.7712.1602.6503.012141.3451.7612.1452.6242.977Table 4 Critical T-values with v degrees of freedom P(X  x)  (U-Tee df x) P(x  2.179) = (U-Tee 12 2.179) = 0.025 is shaded. Upper Tail T -values

38. 10/26/2011rd38Determining P-value Degrees of freedom p-value = 0.022 for t = 2.2 with v = 15 v  = 0.100  = 0.050  = 0.025  = 0.010  = 0.00514 1.345 1.761 2.145 2.624 2.97715 1.341 1.753 2.131 2.602 2.94716 1.337 1.746 2.120 2.583 2.921  Figure 7.6 Partial T-table

39. 10/26/2011rd399. Is there a significant difference between two population means at  = 5% given the following data?  n1 = 100 n2 = 100  1 = 50 2 = 52  = 18 = 16  H0: 1 - 2 = 0 vs. H1: 1  2.   = = -3.43 < -1.96 = z0.025 => Yes, p-value  4.035812e-9 = 2(L-normal 0 34/100 -3.43)

40. 10/26/2011rd40 a) 57 of 100 people voted yes; 43 voted no. Find a 95% confidence interval for p. 0.57  1.96 [(0.57 * 0.43/100)1/2 = 0.57  0.097 or 95% confidence interval is (0.473, 0.667) and 0.5 is inside. b) Test H0: p = 0.5 vs. H1: p  0.5 at  = 5%. 10(0.57 – 0.5)(0.57 * 0.43)1/2 = 1.414 < 1.96. Cannot reject. p-value = (* 2 (phi -1.414))  0.1574 or 15.74%

41. Hypothesis Test for A sample size of 71 from a normal distribution was used to test H0 :  = 15 versus H1 :   15. The sample variance was 20. Compute results with  at 5%Use test statistic 2 = (n – 1) S2 / 2 2 = (70 * 20)/152 = 6.22 <<< 48.75 => Reject H0.(chi-square 70 90.6)  0.95(inv-chi-square 70 2.5)  48.75(inv-chi-square 70 97.5)  95.0310/26/2011rd41

42. 10/26/2011rd42The command (t-test ­0 s n x-bar) returns the t- and p-values for testing H0:  = 0 vs. H1:  0. For example, (t-test 10 2 20 9.85) returns (t = -0.335, p-value = 0.741).The command (one-sample-t data 0) returns the t- and p-values from the sample data; for example, (setf data '(13 8 10 10 8 9 10 11 6 8 12 11 11 12 10 12 7 10 11 8))Then (one-sample-t data 10) prints n df s se mean x-bar t p-value 20 19 1.872 0.419 9.85 -0.358 0.724and returns (t = -0.358 p-value = 0.724).

43. 10/26/2011rd43Let X1,X2, ..., X16 be a random sample from a normal distribution with mean  and variance 2 = 16. In testing the null H0:  = 3 vs. H1:  = 4, the critical region is > xc. If the significance level of the test  is set at 0.04, find the respective value of xc and the probability of a Type II error.Solution: xc =  + z/n1/2 = = 3 + 1.75 * 4/4 = 4.75; (inv-phi 0.96) returns 1.75 z-value.(normal 4 16/16 4.75)  77.34% = (0.75) = 0.773 = 77.3% = (phi 3/4)(4) =

44. 10/26/2011rd44Example: Glow Toothpaste Two-Tailed Test About a Population Mean: s Known Perform a hypothesis test, at the .03 level of significance, to help determine whether the filling process should continue operating or be stopped and corrected.Assume that a sample of 30 toothpaste tubes provides a sample mean of 6.1 oz. The population standard deviation is believed to be 0.2 oz.

45. 10/26/2011rd451. Determine the hypotheses.2. Specify the level of significance.3. Compute the value of the test statistic.a = .03 p –Value and Critical Value ApproachesH0: = 6H1:Two-Tailed Tests About a Population Mean:s Known

46. 10/26/2011rd46Two-Tailed Tests About a Population Mean:s Known5. Determine whether to reject H0. p –Value Approach4. Compute the p –value.For z = 2.74, cumulative probability = .9969(* 2 (phi -2.74)) = p–value = 2(0.0031) = 0.0062Because p–value = 0.0062 < a = 0.03, H0 is rejected.There is sufficient statistical evidence to infer that the alternative hypothesis is true,(i.e. the mean filling weight is not 6 ounces).

47. 10/26/2011rd47Two-Tailed Tests About a Population Mean:s Knowna/2 = .0150za/2 = 2.17za/2 = .015 p-Value Approach-za/2 = -2.17z = 2.74z = -2.74 1/2p -value= .0031 1/2p -value= .0031

48. Two Population MeansMen's height are N(70, 16); women's N(66, 9). Find the probability of a randomly selected woman being taller than a randomly selected man.W-M ~N(-4, 25) => P(W-M > 0) = 1 - [0 – (-4)/5] (U-normal -4 25 0)  0.21210/26/2011rd48

49. Hypothesis Test for 2H0: 2 = 20 vs. H1: 2  20 Test Statistic: 2 = (n – 1)s2/20Confidence Interval: (n – 1) s2  2  (n – 1) s2 2/2, n – 1 2 1-/2, n – 110/26/2011rd49

50. 10/26/2011rd50Contingency TablesCheck to see if the first 1000 decimal digits of  are biased in the number of digits from 0 to 9 with  set at 5%.Command (print-count-a-b 0 9 (pi1000)) returns First 1000 Integers of Integer 0 1 2 3 4 5 6 7 8 9Count 93 116 102 104 93 96 94 95 101 106(chi-square-test '((93 116 102 104 93 96 94 95 101 106))) Cell Chi-sq = 0.49 + 2.56 + 0.04 + 0.16 + 0.49 + 0.16 + 0.36 + 0.25 + 0.01 + 0.36 = 4.882 = 4.88, df = 9, p-value = 0.8446, expected-values = 100 100 100 100 100 100 100 100 100 100) Hence, cannot reject.

51. 10/26/2011rd51 True or FalseWith a set at 5%, a p-value of 0.047 rejects H0. If H0 is rejected using a 1-tail, then H0 is rejected using 2-tail.If test statistic falls in rejection region, H0 is rejected.If H0 is true, increased a tends to reject it.A 95% confidence interval (23.5 29.5) rejects H0  = 30.If test statistic does not fall in rejection region when H0 is false, Type II error occurs.If n increases and a increases, width of interval decreases.POWER of hypothesis test increases as n increases.(sim-plot-ci 25 20 50 5 5) vs. (sim-plot-ci 25 20 100 5 15)

52. 10/26/2011rd52Contingency (crosstabs)TablesMaleFemaleTotalsMarried25 15 40Unmarried35 25 60Totals60401002 = (1/24 + 1/16 + 1/36 + 1/24) = 0.1736; p-value 0.68Cannot reject null hypothesis of independence.Knowing a person was married would give you no increased probability of the person's gender.Rule of Thumb: Each expected value should be > 5 for the test.

53. Marijuana vs. Alcohol & Drugs Neither One BothTest to see if marijuana use is independent of parental use of alcohol and drugs. (chi-square-test '((141 54 40)(68 44 51)(17 11 19))) 9 2 = 22.37 p-value = 1.69d-4 df 4) => Reject Independence10/26/2011rd53Never OccasionalRegularly1415440684451171119

54. Contingency Table 1 2 3 TotalA - - - 25B - - - -C - - - 40D - - - 75Total 50 20 - 150 10/26/2011rd54Can you find the expected number in each cell?

55. Contingency Table Morning Noon NightFlu 16 13 18Headache 24 33 6Breathing 7 9 9Is Shift independent of illness?(chi-square-test '((16 13 18)(24 33 6)(7 9 9)))  9 cell chi-squares = 0.008 + 1.974 + 3.690 + 0.195 + 2.095 + 5.738 + 0.333 + 0.138 + 1.366 + = 15.537 The expected cell values are: ((16.362964 19.148148 11.48889) (21.933332 25.666666 15.4) (8.703704 10.185186 6.111111)) (2 = 15.54 p-value = 3.708e-3 df = 4 N = 9 G2 = 16.67)10/26/2011rd55

56. Binomial FitLet X be the number of hearts when drawing 3 cards from a deck repeated 64 times to test H0: p = ¼ X 0 1 2 3Frequency 21 31 12 0Expect 27 27 9 1 Prob 0.42 0.42 0.15 (binomial 3 1/4 x) (chi-sq-test '((21 31 12)(27 27 10))) (2 = 1.208 p-value = 0.547 df = 2 N = 6 G-SQ = 1.210121) Cannot reject.10/26/2011rd56

57. 10/26/2011rd57Poker HandsHow many 5-card poker hands constituting just 3 of a rank do we expect in the first 100 digits of  (assumed random)? One pair?100/5 = 20 hands [xxx y z  3 ranks] sampling with replacementP(3 of a rank) = 1 * 0.1 * 0.1 * 0.9 * 0.8 * 5C3 = 0.072Expect 0.072 * 20 = 1.44 3-of-a rank hands or 3 triples. [ww x y z] => 1 * 0.1 * 0.9 * 0.8 * 0.7 * 5C2 = 0.504Expect 0.504 * 20 = 10.08(count 1 (mapcar #' rank-n (re-group pi-100 (list-of 20 5)) (list-of 20 3)))  2(count 1 (mapcar #' rank-n (re-group pi-100 (list-of 20 5)) (list-of 20 2)))  11

58. G-test10/26/2011rd58 O is observed and E is expected.

59. 10/26/2011rd59Goodness of Fit Defect data of 120 bolts was assumed Poisson with k = 3/4.Test at  = 5%. Number of Defects Observed Expected 0 67 0.472*120 = 56.7 1 40 0.354*120 = 42.5 2 10 0.133*120 = 15.9 3+ 3 0.033*120 = 4 2 = 4.46 with p-value = 0.216.

60. 10/26/2011rd60RV X ~N(75.20, 12.96) H0:  = 75.2 vs. H1:  > 75.2; n = 15; a = 5%. Find  = 77.Accept if < 75.2 + 1.645 * 3.6 / (sqrt 15) = 76.729 (+ 75.2 (/ (* 1.645 3.6) (sqrt 15))  76.72977 = (normal 77 (/ 12.96 15) 76.729)  0.3853

61. 10/26/2011rd611. Ask the question “Do you cheat on your spouse?” or “Do you do drugs?” is not likely to elicit true response. Mark 50 cards I and 50 more II and let each person reach in and pull out a card and remember the mark. Tell them to answer the sensitive question if Type I picked, to answer the question “Is the last digit of your phone number a 0, 1, or 2” if Type II picked. Let p denote the proportion of sensitive yes and let k = P(yes response on the questions). 50 in each group.Then k = 0.5p + 0.5 * 0.3 Let RV X denote the number of yes responses; X is Bin(n, k, x) and X/n is an unbiased estimator for k. If n = 80 and x = 20Yes, then k-hat = 1/4 = 0.5p + 0.15 from which p = 0.2. Estimate 20% cheat on spouse, etc.Find p for 70 Type I's and 30 Type II's with x = 30. ans. 0.30

62. 10/26/2011rd62 Given RV X with density f(x; ) = ( + 1) x for 0 < x < 1;  > -1. H0:  = 1 is to be rejected if and only if X > 0.8. H1:  = 2. Find , and  for  = 2 and for  = 3.  = P(X > 0.8 |  = 1) = = 0.36; =2 = P(X < 0.8 |  = 2) = = 0.512. =3 = P(X < 0.8 |  = 3) = = 0.4096.

63. P-value t-testTo test H0:  = 16 vs.   16, ten 16-oz cereal boxes were collected and contents were weighed. X-bar = 15.8 with s = 0.2 ounce. Estimate p-value with  at 5%.t = 3.16(15.8 – 16)/0.2 = -3.16 < -2.262  Reject. p-value = 2(0.005754) = 0.0115(tee 9 -3.16 2)  5.775122e-3(* 2 5.775122e-3)  0.0115 10/26/2011rd63

64. ProblemA random sample of size 4 from N(, 2) was used to test the H0:   0 and to reject H0 iff X1 + X2 + X3 + X4 < -20. The significance level for the test is 0.14. The value of  then is closest to4.5 b) 6.7 c) 9.3 d) 13.3 e) 18.2(inv-phi 0.14)  Z = -1.08 = (-5 - 0)/ /2 =>  = 9.26How far is x-bar = -5 from  in sd's? 0.54 sd.10/26/2011rd64

65. Proportion of DefectivesTo test H0: p  ¼ versus H1: p > ¼ a random sample of size 5 is taken. If 4 or more defectives are found, H0 is rejected. Find the probability of rejecting H0 if p = 1/5. (- 1 (cbinomial 5 1/5 3))  0.00674210/26/2011rd65

66. Difference in ProportionMethod I had 57 successes from 150 attempts; Method II had 33 out of 100 attempts. Test at  = 5% to determine if Method I is better than Method II.H0: p1 – p2 = 0 vs. H1: p1 > p2 p-hat = (57 + 33)/250 = 0.36 pooled p-hat and z = (57/150 – 33/100) (0.36 * 0.64)(1/150 + 1/100)1/2 = 0.80687 < (inv-phi 95) = 1.645 Cannot Reject.10/26/2011rd66

67. Difference in Proportion Plea Guilty Not GuiltyNumber judged Guilty 191 64Number sent to prison 101 56Sample proportion p1-hat = 0.529 p2-hat = 0.875H0: p1 – p2 = 0 H1: p1 – p2  0 101/191 = 0.529; 56/64 = 0.875SP/JG = 157/255 = 0.6157 = pooled p estimate, unknown p 10/26/2011rd67Reject

68. Hypothesis TestingRV X has density ( + 1)x for 0 < x < 1. The hypothesis H0:  = 1 is to be rejected in favor of H1:  = 2 if X > 0.9.Find the probability of a Type I error.= P(X > 0.9 |  = 1) = Find the probability of a Type II error.(2) = P(X < 0.9 |  = 2) = 10/26/2011rd68

69. T-Hypothesis TestTest H0:  = 10 vs. H1:   10 n = 4,  = 5%, x-bar = 15.84, s2 = 16.Find critical value and decide on hypothesis.t = (15.84 – 10)/4/2 = 2.92 < 3.16 critical t(* 2 (tee 3 2.92))  0.0615 p-valueCannot Reject10/26/2011rd69

70. IndependenceThe following welds were classified according to x-ray inspection and human eye. Are they independent at  = 5%. Human Eye Bad Normal Good Bad 20 7 3Normal 13 51 16Good 7 12 21 (chi-square-test '((20 7 3)(13 51 16)(7 12 21)))  (2 = 47.8683 p-value = 1.005e-9 df = 4 G2 = 42.746) Reject10/26/2011rd70

71. MLE for  Let X1, X2, X3, and X4 be a random sample from the discrete distribution X such that P(X = x) = ; x = 0, 1, 2, … and  > 0. If the data are 17, 10 , 32, and 5, what is maximum likelihood estimate of ? Choose from 4, 8, 16, 32, 64.L(xi, ) = 2x e-n^2 / Product of xi!Ln L = 2xi Ln  -n2 – Ln xi (Ln L)' = 2 xi / -2n = 0 => 2n2 = 2 xi => X-bar = (17 + 10 + 32 + 5)/4 = 16 => -hat = 4.10/26/2011rd71

72. 10/26/2011rd72Given data, determine if sample could have come from N(5, 4). H0: Sample is from N(5, 4) vs. H1: Sample is not from N(5, 4).Compute 25th and 75th percentiles of N(5, 4), (inv-phi 25)  0.6742P25 = 5 - 2(0.6742) = 3.6516 P75 = 5 + 2(0.6751) = 6.3484(setf data (sim-normal 5 2 30))(5.86 5.10 3.42 6.23 5.14 6.15 2.03 1.18 4.55 9.53 1.75 5.12 4.66 5.36 8.91 5.60 3.56 6.11 6.22 9.11 4.03 7.43 5.10 7.31 2.59 7.22 6.04 4.38 3.80 4.49)Observed 6 6 12 6Expected 7.5 7.5 7.5 7.5Cell Chi-sq = 0.3 + 0.3 + 2.7 + 0.3 = 3.6(chi-sq-value = 3.6 df = 3 p-value = 0.307 Expected-values = 7.5 (phi-test mu sigma data)Test could be structured for deciles, etc.

73. Pooled-tTwo appliances X and Y are labeled as weighing 300 pounds. Weights from the same scale show: (setf x '(324 295 305 304 285) y ‘(285 310 305 290 305 317))Do the weights differ?H0: X - Y = 0 vs. X - y  0(T-pool X Y) x1-bar = 302.60 x2-bar = 302.00 svar-1 = 208.30 svar-2 = 148.00 s^2-pooled = 174.80 s-pooled = 1t-statistic = 0.075 2-tailed p-value = 0.9419 95% confidence interval is (-17.513 18.713 ) 10/26/2011rd73

74. Two-sided t-testH0:  = 10.0 vs. H1:   10.0 given data n = 16, x-bar = 10.6 and s = 1.61.t = 4(10.6 – 10)/1.61 = 1.491 => p-value = 2 * 0.078 = 15.6%Fail to reject H0. (* 2 (tee 15 1.491))  0.156785% confidence interval for  is 10.6  1.518 * 1.61/4 or(9.989, 11.211) and we note that 10 is in the interval. Repeat test given x-bar = 11.6t = 4(11.5 – 10)/1.61 = 3.727 => p-value = 2 * 0.001 = 0.2%Reject Ho. Using a Control Group in experimental design10/26/2011rd74

75. 10/26/2011rd75Test to see if following sample from a normal distribution has mean 5 with variance 4. (1 7 5 2 3 5 8 4 10 6 3 10)(one-sample-t data mu-0)(one-sample-t ‘(1 7 5 2 3 5 8 4 10 6 3 10) 5)95 % CI = (3.4494, 7.2172) t = 0.3895 p-value = 0.7043)(phi-test 5 2 ‘(1 7 5 2 3 5 8 4 10 6 3 10))  Number in each cell: (4 3 1 4)Cell Chi-sq = 0.3333 + 0 + 1.3333 + 0.3333 = 2(Chi-SQ-Value = 2 df = 3 p-value = 0.5724 Expected-Values = ((3 3 3 3)))

76. 10/26/2011rd76(phi-test 50 5 (sim-normal 50 5 30)) number in each cell: (7 7 9 7) x-bar = 50.346, sigma = 4.600 4 cell chi-squares = 0.033 + 0.033 + 0.300 + 0.033 + = 0.400 The expected cell values are: ((7.5 7.5 7.5 7.5)) (2 = 0.4 P-VALUE = 0.94 DF = 3 N = 4 G-SQ = 0.384088)(phi-test 48 5 (sim-normal 50 5 30)) number in each cell: (5 7 5 13) 4 cell chi-squares = 0.833 + 0.033 + 0.833 + 4.033 + = 5.733 (2 = 5.733334 P-VALUE = 0.12533 DF = 3 N = 4 G-SQ = 5.226003)(phi-test 50 25 (sim-normal 50 5 30)) number in each cell: (0 13 17 0) x-bar = 49.912, sigma = 3.771 4 cell chi-squares = 7.500 + 4.033 + 12.033 + 7.500 + = 31.067 The expected cell values are: ((7.5 7.5 7.5 7.5)) (2 = 31.07 P-VALUE = 7.98e-7 DF = 3 N = 4 )

77. 10/26/2011rd77(phi-test 50 5 (sim-binomial 100 1/2 100)) returns Number in each cell: (27 29 22 22)Cell Chi-sq = 0.16 + 0.64 + 0.36 + 0.36 = 1.52(chi-sq-value = 1.52 df = 3 p-value = 0.6769 EXPECTED-VALUES = ((25 25 25 25)))

78. Paired-t Test to see if difference is significant between organic and nonorganicOrganic 17.53 20.60 17.62 28.93 27.10Nonorganic 15.59 14.76 13.32 12.45 12.79(two-sample-t ‘(17.53 20.60 17.62 28.93 27.10) ‘(15.59 14.76 13.32 12.45 12.79))(t = 3.4754 df = 4 p-value = 0.1332 95% CI = (1.7 15.4)(paired-t '(17.53 20.60 17.62 28.93 27.10) '(15.59 14.76 13.32 12.45 12.79))(t = 2.9836 p-value = 0.1693 95% CI = (0.6129 16.5350)) V(Xi1 – Xi2) = 2 + 2 – 2Cov(Xi1, X12) reduces variance10/26/2011rd78

79. Two-Sample t (Unequal Variance)x - y  xbar – ybar  t/2,v(sx2/n1 + sy2/n2)1/2 where v = df = (sx2/n1 + sy2/n2)2 sx4/n12(n1 -1) + sy4/n22(n2 -1)10/26/2011rd79

80. Double Blind ExperimentsIn a double blind experiment (pun intended) testing the effects of disposable contacts, subjects wore a defective lens in one eye and a non-defective lens in the other. The defective eye had 3.3 microcyst while the good eye had only 1.6 microcyst resulting in a p-value of 0.04 for the 29 subjects.However, observation of fewer than 50 microcysts per eye requires no clinical action. Thus, the test was statistically significant but not practically significant.10/26/2011rd80

81. 10/26/2011rd81Before 120 131 190 185 201 121 115 145 220 190 After 119 130 188 183 188 119 114 144 243 188Delta 1 1 2 2 3 2 1 1 -23 2When tested at alpha = 5%, H0 of no difference in weight loss could not be rejected. However 9 out of 10 lost weight on the diet. The test had practical significance but not statistical significance. May consider the experiment of testing the number of who lost weight (different hypothesis).

82. The Weight DebateNew York Times writes “People who are overweight but not obese have a lower risk of death than those of normal weight …” ExplainSmoking makes people leaner (and smokers die earlier than nonsmokers. 30% of subjects)illness makes people leaner (chronically sick people are lean).Age often makes people leaner.Be a skeptical inquirer.10/26/2011rd82

83. Mendel Genetics10/26/201183In one of Gregor Mendel’s experiment, he found the following: Observed ExpectedSmooth yellow 315 312.75Smooth green 108 104.25Wrinkled yellow 102 104.25Wrinkled green 31 34.75 Is the fit too good? YES, Explain.(chi-square-test '((315 108 102 31)(312.75 104.25 104.25 34.75)) 8 cell chi-squares = 0.004 + 0.033 + 0.012 + 0.107 + 0.004 + 0.033 + 0.012 + 0.107 + = 0.313 The expected cell values are: ((313.875008 106.125 103.125 32.875) (313.875008 106.125 103.125 32.875)) (Chi-square = 0.313 p-value = 0.96 df = 3)

84. Hypothesis Tests Examples10/26/201184

85. Binomial Confidence IntervalX = 11 from a binomial with n = 32. Find a 95% confidence interval for p.p in 11/32  1.96(11 * 21/323)1/2 (0.179, 0.508)10/26/2011rd85

86. 10/26/2011861. A chip manufacturer claims that no more than 2% of the chips are defective. A company buys 300 chips to test and finds 10 defectives. Should the claim be refuted at  = 5%?H0: p = 0.02 vs. H1: p > 0.02Compute the probability that 10 or more defectives would occur with p = 0.02 for Binomial assuming with replacement.Approximate test ~ P(X >= 10 | p = 0.02, n = 300) (- 1 (cbinomial 300 0.02 9)) = 0.082 > 0.05 => No Reject.Normal method 1 -  0.0495 < 0.05 => reject. Observe np0 = 6; np0q0 = 5.88(U-normal 6 5.88 10)  0.0495

87. 10/26/201187t-TestA random sample of 8 batteries showed a shelf life of 108 134 124 116 128 163 159 134 in days. Test at 5% if mean shelf life exceeds 125.H0: µ = 125 vs. H1: µ > 125x-bar = 133.25; s2 = 371.07 => s = 19.3t = (/ (* (sqrt 8) (- 133.25 125)) 19.3) = 1.211 < t7,0.025 = 2.365(one-sample-t '(108 134 124 116 128 163 159 134 ) 125) n df s se mean x-bar t p-value 8 7 19.263 6.811 133.250 1.211 0.2651 (t = 1.211, p-value = 0.2651)

88. 10/26/201188Paired-t-testsBefore: 5 8 9 12 16 20 25After 4 9 12 10 20 18 20Difference 1 -1 -3 2 -4 2 5Test at  = 5% to test for a significant difference.(setf before ‘(5 8 9 12 16 20 25) after ‘(4 9 12 10 20 18 20))(paired-t before after)  n d-bar Std Error t-value p-value 95% Confidence Interval 7 0.29 1.19 0.2402 0.81818 (-2.62 3.20)

89. 10/26/2011892. Management claims the daily number K of defective chips to be  25. A 5-day sample shows the defects to be 28, 34, 32, 38, 22. Test H0: K <= 25 vs. H1: K > 25. Use normal test also.A 5-day K0 = 5 * 25 = 125 with 154 defects. H0: K = 125 vs. H1: K < 125 (sum ‘(28 34 32 38 22))  154(cpoisson 125 154)  0.9947 => 1 – 0.9947 = 0.00526. Rejectp-value = PK=125(X > 154) = 0.00526. Reject.Normal approximation:  = 25, 2 = 24, n = 5, = 154/5 = 30.8 1 - = 0.004 = (U-normal 25 24/5 30.8)

90. Goodness of Fit TestsE(X) = np Test statistic T = Number deaths before/after Birth Month n =1251,p =104.256 5 4 3 2 1 On 1 2 3 4 590 100 87 96 101 86 119 118 121 114 113 106 T = 132209/104/25 – 1251 = 17.192(U-chi-sq 11 17.192)  0.102323Re-group 1 = 277; 2 = 283 3 = 358 4 = 333 n/4 = 312.75T = 14.775 and (U-chi-sq 3 14.7752)  0.002 => ReTest with new data. 10/26/2011rd90

91. 10/26/201191Chi-Square TestEducationMarried Once Married more TotalCollege55061611No college681144825Total12312051436 (chi-square-test ‘((550 61)(681 144))) (chi-sq-value = 16.01 p-value = 0.000048)expected cell values (523.775 87.225) (707.225 117.775)4 Cell Chi-squares = 1.313 + 7.885 + 0.972 + 5.839 = 16.01

92. 10/26/201192t-TestFive measurements are 16.5 16.2 16.4 16.3 16.6. Show at  = 5 % if µ = 16 can be rejected in favor of µ  16. x-bar = 16.4; s2 = 0.025 (mu-svar ‘(16.5 16.2 16.4 16.3 16.6))  (16.4 0.025). (one-sample-t ‘(16.5 16.2 16.4 16.3 16.6) 16) n df s se mean x-bar t p-value 5 4 0.158 0.071 16.400 5.657 0.0048 < 0.05 => Reject (95% Confidence Interval = (16.204 16.596). Note that 16 is not in the interval.

93. 10/26/201193Pooled-tThe two samples were taken from normal distributions with unknown means but with equal variances. Determine if there a difference in their means at  = 5%.   Sample-1: 25 34 34 27 28 27 36 Sample-2: 36 29 28 22 25 37 20 30 28(setf x1 '( 25 34 34 27 28 27 36) x2 '(36 29 28 22 25 37 20 30 28))(t-pool x1 x2)  x1-bar = 30.14 x2-bar = 28.33 n1 = 7 n2 = 9 svar-1 = 19.14 svar-2 = 32.25 s^2-pooled = 26.63 s-pooled = 5.16 t-statistic = 0.696 two-tailed p-value = 0.4980 95% confidence interval is (-3.770 7.389 ) => Cannot Reject, p-value 0.498.

94. 10/26/201194Genie> (t-pool x1 x2)X1-BAR= 30.143 X2-BAR= 28.3333SVAR-1= 19.1429 SVAR-2= 32.25 S^2-POOLED= 26.633T-STAT = 0.69582-SIDED-P-VALUE= 0.498 95% 'CI = (-3.7698 7.3889)s-pool = 5.1607

95. Mendel Genetics10/26/201195In one of Gregor Mendel’s experiment, he found the following: Observed ExpectedSmooth yellow 315 312.75Smooth green 108 104.25Wrinkled yellow 102 104.25Wrinkled green 31 34.75 2 = 0.0162 + 0.135 + 0.0486 + 0.405 = 0.604 with 3 df (U-chi-square 3 0.604)  0.895 or expect to occur about 90% of the time. In all of Mendel's experiments, p-value = 0.99996

96. Data ManipulationDiametrically opposite conclusions from same raw data.10 diners with plate sizes possibly influencing portions.Bold indicates averages. Initially 3, 4 and 3 diners. Small Medium Large 3 < 8" (9 11 10 10) 4 8-11"(18 7 15 4 11) 3>11"(13 11 12 12) 4<8" (9 10 11 18 12) 2 8.2-10.8 (7 15 11) 4 (4 13 11 12 10)By making small changes in the categories and defining medium plate size to be 8.2 to 10.8 resulting in the misclassification of 2 diners.Larger categories allow more manipulation.

97. Chi-Square-Tests10/26/201197CureNo CureDrug A100 (105)300 (295)Drug B90 (5)330 (15) Laboratory 1Cure No CureDrug A 2 (4)18 (16)Drug B 80 (78)320 (322) Laboratory 2

98. Chi-Square-Tests10/26/201198CureNo CureDrug A L1100 (97)300 (303)Drug A L22 (5)18 (15)Cure No CureDrug B L1 10 (15)10 (5)Drug B L280 (75)320 (25)

99. 10/26/201199Chi-Sq-Test ResultsCheck independence of cure versus drug in both labs and across labs.Lab:1 Drug vs. Cure is X21 = 6.2 with p-value = 0.013 RejectLab: 2 Drug vs. Cure is X21 = 1.2 with p=value = 0.27 AcceptDrug A v. Labs Cure is X21 = 2.3 with p-value = 0.127 AcceptDrug B v. Labs Cure is X21 = 8 with p-value = 0.0014 Reject

100. Odds Ratios10/26/2011100Odds(A) = p/q = P(A) / [1 – P(A)]P(A) = odds(A) / [1 + odds(A)]Let X denote exposed to a disease D. Thenodds(D|X) = P(D|X) / [1 – P(D|X)]odds(D|Xc) = P(D|Xc) / [1 – P(D|Xc)]odds ratio =  = odds(D|X) / odds(D|Xc)

101. 10/26/2011101DcDXcp11p12P(Xc)Xp21p22P(X)P(Dc)P(D) 1P(D|X) = p22/P(X) and P(D|Xc) = p12 /P(Xc)odds(D|X) = p22 / p21 and odds(D|Xc) = p12 / p11odds ratio = p11p22 / p12p21; product of main diagonal divided by product of off-diagonal.

102. Odds Ratios10/26/2011102TonsillectomyNo TonsillectomyHodgin’s6734Control4364Odds Ratio  = 67*64/43*34 = 2.94The odds of contracting Hodgins’s are increased by a factor of 3 with a tonsillectomy.

103. 10/26/2011103Beta Error Let X1 , X2 , ..., X16 be a random sample from a normal distribution with mean  and variance 4. In testing H0:  = 0 vs. H1:  = 1, the critical region is x-bar > xc. If the significance level of the test  is set at 4% find the respective value of xc and the probability of a Type II error.  xc =  + z0.96/ = 0 + 1.75 * 2/4 = 0.875. (1) = P(x-bar <= 0.875 |  = 1) = [4(0.875 - 1)/2] = (-0.25) = 0.4013.

104. 10/26/2011104Chi Square TestUse the chi-square test at  = 5% to determine whether the digits of  from 301 to 400 are biased.72458 70066 06315 58817 48815 20920 96282 92540 91715 36436 78925 90360 01133 05305 48820 46652 13841 46951 94151 16094 Digit 0 1 2 3 4 5 6 7 8 9 Count 13 13 9 8 10 12 11 5 10 9  29 = (9 + 9 + 1 + 4 + 0 + 4 + 1 + 25 + 0 + 1)/10 = 5.4 < 16.9 = 29,,.05. p-value = 0.798

105. 10/26/2011105Three batteries in each of 450 randomly selected calculators were tested for defects. Could the distribution be binomial?Number of defects 0 1 2 3 Frequency 250 100 75 25Binomial Probability 0.44 0.42 0.132 0.014Expected 196.96 187.35 59.41 6.28p-hat = 0*250 + 1 * 100 + 2 * 75 + 3 * 25 = 325 and 325/1350 = 0.24 (binomial-gf '(0 1 2 3) '(250 100 75 25)) returns X = (0 1 2 3) Frequency = (250 100 75 25)Probabilities = (0.4376936 0.4163427 0.1320111 0.0139523)Expected = (196.9621627 187.3542524 59.4050068 6.2785779)(P-hat = 0.2407407 Chi-Sq = 114.9284748 V = 2 P-value = 0.0001)

106. 10/26/2011106Alpha-Beta Testf(x) = x-1, 0  x  1 given X1 X2 … X6 with  > 0.H0:  = 1 vs. H1:  = 2. H0 is rejected iff at least 4 of sample observations exceed 0.8. Find the  and  errors.Assuming  = 1 => p = 0.2P(rejecting  = 1) = (- 1 (cbinomial 6 0.2 3))  0.01696 = Assuming  = 2 => p = 0.64P(accepting  = 1|  = 2) = (cbinomial 6 0.64 3) 0.3732 = .

107. 10/26/2011107 A coin flipped 500 times came up 270 heads and 230 tails. Test using the chi-square test, the normal approximation to binomial, and the binomial to determine if the coin is fair. X2: (270 – 250)2/250 + (230 – 250)2/250 = 800/250 = 3.2 (chi-square 1 3.2)  0.9264 => p-value = 0.0736 N(250, 125) z = (270 – 250)/(sqrt 125) = 1.7889 Observe z2 = 1.78885432 = 3.2 = X2 (- 1 (phi 1.7888543)) * 2 = 0.0368191 * 2 = 0.0736382 p-value. With continuity correction z = (269.5 – 250)/(sqrt 125) = 1.7441 (- 1 (phi 1.7441330)) * 2 = 0.04057 *2 with p-value = 0.0811 Binomial: (cbinomial 500 1/2 230)  0.04052 2 * 0.040512 = 0.08104 p-value

108. Pooled VariancePooled variance = (n1 – 1)S12 + (n2 – 1)S22 n1 + n2 – 210/26/2011108