Confidence intervals (probabilty and statistics

22
Prepared by Narinderjit Singh Confidence Interval Probability & Statistics C O N FID E N C E IN T E R V A LS NO TIO N :(1 -)CO N FID EN C E IN TER VA L C IFO R NO RM AL PO PU LATIO N M EAN C IFO R ANY PO PU LATIO N M EAN : LARG E SAM PLE C IFO R PRO PO R TIO N (O R PRO B A B ILITY) p C IFO R NO RM AL TW O PO PU LATIO N M EANS C IFO R NO RM AL PO PU LATIO N VA R IA N C E 2 INTRO DUCTIO N TO CHAPTER 6 1

Transcript of Confidence intervals (probabilty and statistics

  • 1. INTRODUCTION TO CHAPTER 6CONFIDENCE INTERVALS NOTION: (1 - ) CONFIDENCE INTERVAL CI FOR NORMAL POPULATION MEAN CI FOR ANY POPULATION MEAN : LARGE SAMPLE CI FOR PROPORTION (OR PROBABILITY) p CI FOR NORMAL TWO POPULATION MEANS CI FOR NORMAL POPULATION VARIANCE 2 Prepared by Narinderjit Singh Confidence Interval Probability & Statistics1

2. NOTION - DEFINITION CONFIDENCE INTERVAL Definition Consider Definition: The Interval is called to be the (1 - ) CI for a parameter Prepared by Narinderjit Singh Confidence Interval Probability & Statistics2 3. CI FOR NORMAL MEAN WHEN VARIANCE IS KNOWN The Key:The (1- ) CI for the normal mean is:Prepared by Narinderjit Singh Confidence Interval Probability & Statistics3 4. Example 1: Find 95% CI for of X: content (liters) of certain containers. Suppose that X is normally distributed with standard deviation = 0.3. A sample of 16 containers gives a mean of 15.124 liters. Solution: Problem: CI for the mean of X. X: Normally Distributed Variance is known: Standard Deviation, = 0.3 Apply [ X , X + ] , where = z ( / n ) Given: size n = 16, Standard Deviation, = 0.3, x = 15.124 liter. 1 - = 0.95, = 0.05, / 2 = 0.025, z = 1.96 Calculate: = z / n = 1.96(0.3) / 16 = 0.147 20.025 /2x = 15.124 0.147 = 14.977 x + = 15.124 + 0.147 = 15.271 Answer: The 95% CI for is[14.977, 15.271] liters.Prepared by Narinderjit Singh Confidence Interval Probability & Statistics4 5. CI FOR NORMAL MEAN WHEN VARIANCE UNKNOWN The key:X T= ~ t(n 1) , n < 30 S/ n The (1- ) CI for the normal mean is:Prepared by Narinderjit Singh Confidence Interval Probability & Statistics5 6. Example 2: Find the 90%-CI for the mean of gas mileage, in (miles/gallon). Suppose the mileage is normally distributed.A sample of size 25 gives a sample mean 36.524 and a standard deviation 2.41. Solution: Problem: CI for the mean of gas mileage, X. X: Normally Distributed,Variance is unknown: Apply [ X , X +] , where =t ( S / n ) Given: size n = 25, Standard Deviation, S = 2.41, x = 36.524 1 - = 0.90, = 0.10, / 2 = 0.05, t = 1.711 Calculate: = t (S / n ) = (1.711)(2.41 / 5) = 0.825 , X = 36.524 , n 1 20.05,24 , n 1 2x = 36.524 0.825 = 35.699 ; x + = 37.349 Answer: The 90% CI for the mean of gas mileage is [35.699, 37.349] miles/gallon Prepared by Narinderjit Singh Confidence Interval Probability & Statistics6 7. Example 3: 1. Suppose that the following data are observations from N (, 2), 2 is unknown: 15 81 41 27 23 16 29 30 32 22 25 18 Find a 95% confidence interval for . 2. How large a sample is required if we want the length L of a 95% confidence interval for the mean of a normal population with standard deviation = 0.6 is at most 0.2? Prepared by Narinderjit Singh Confidence Interval Probability & Statistics7 8. Solution: 1. Problem: CI for the mean of X. X: Normally Distributed,Variance is unknown: Apply [ X , X +] , where =t ( S / n ) Given: size n = 12, Standard Deviation, S = 17.68, x = 29.92 1 - = 0.95, = 0.05, / 2 = 0.025, t = 2.201 Calculate: = t (S / n ) = (2.201)(17.68 / 12 ) = 11.23 , x = 29.92 , n 1 20.025,11 , n 1 2x = 29.92 11.23 = 18.69 ;x + = 41.15 Answer: The 95% CI for the mean is [18.69, 41.15] 2. The length of the (1- ) confidence interval for is L = 2. = 2.z . /n2L 0.2,2.z . / n 0.2 2orn [2(1.96)(0.6) /(0.2)]2 = 138.3 139Prepared by Narinderjit Singh Confidence Interval Probability & Statistics8 9. CI FOR THE MEAN OF ANY DISTRIBUTION: LARGE SAMPLE Key: Then X P z 2 / n z 1 2 Therefore the Approximate (1 - ) CI for is will be replaced by S if is unknown Prepared by Narinderjit Singh Confidence Interval Probability & Statistics9 10. Example 4: Find the 99% CI for the mean of certain chemical substance (in grams/liter) in a river, based on measurements in 36 randomly selected locations: sample mean = 2.45, S = 0.3 Solution: Problem: CI for the mean of X. X: Not normally distributed,[Variance is unknown,wheren = z / 2 ( S / n ) X , X + ] , Large (n = 36), Apply x Given: size n = 36, Standard Deviation, S = 0.3, = 2.45 1 - = 0.99, == z0.01,/ /n2 = (0.005,)(z .3 / =)2.576 , x = 2.45 (S ) = 2.576 0 6 = 0.129 Calculate: x = 2.45 0.129 = 2.321 ; x + = 2.579 Answer: The 99% CI for the mean of the chemical 20.005substance in a river is [2.321, 2.579] mg/l Prepared by Narinderjit Singh Confidence Interval Probability & Statistics10 11. CI FOR PROPORTION p Key: X: number of S-items in an n- sample Condition: np = X 5, n(1 p ) = n X 5 p p z 1 Then P z 2 2 p(1 p ) / n Therefore the Approximate (1 - ) CI for p is:Prepared by Narinderjit Singh Confidence Interval Probability & Statistics11 12. Example 5: Find the 90% CI for the proportion p of defective items produced by a manufacturer if in a random sample of 250 items there are 12 defectives. Solution: Problem: CI for the proportion p of defective items. Large sample. Apply [ p , p +] , where = z Given Sample Data: n = 250, X = 12 1 - = 0.90, = 0.10, / 2 = 0.05, z = 1.645 Calculations: 2 p (1 p ) / n0.05 p = X / n = 12 / 250 = 0.048 , = z0.05 p(1 p ) / n = 0.0222 p = 0.048 0.0222 = 0.0258 ; p + = 0.048 + 0.0222 = 0.0702 Answer: The 90% CI for the proportion p of defective items produced by the manufacturer is [0.0258; 0.0702] Prepared by Narinderjit Singh Confidence Interval Probability & Statistics12 13. CI FOR TWO NORMAL MEANS - VARIANCES ARE KNOWN The Key:The (1- ) CI for the normal mean 1 2 is:Prepared by Narinderjit Singh Confidence Interval Probability & Statistics13 14. Example 6: A random of 20 specimens of cold-rolled steel yield a sample average strength 30.2 , and a sample of 25 galvanized steel specimens gave a sample average strength 35.1. Assume these two strength distributions are normal with 1 = 4.0 and 2 = 5.0. Find the 99% CI for the difference in mean 1- 2.Solution: Problem: CI for the difference in mean 1- 2 of two normal random variables, known variances Apply 2[ (X1 X 2 ) , (X1 X 2 ) + ] , where = z 21n12+2n21- = 0.99, = 0.01, /2 = 0.005 z /2 = z 0.005 = 2.576 x1 = 30.2, x 2 = 35.1 , 1 = 4.0, 2 = 5.0, n1 = 20, n2 = 25 Calculate2 =z 221 2 4.0 2 5.0 2 + = (2.576) + = 3.456 n1 n2 20 25(X1 X 2 ) = (30.2 35.1) 3.456 = 8.356, (X1 X 2 ) + = (30.2 35.1) + 3.456 = 1.444Answer: The 99% CI for the difference in mean 1- 2 of cold-rolled steel strength is [-8.356, -1.444] Prepared by Narinderjit Singh Confidence Interval Probability & Statistics14 15. CI FOR ANY TWO MEANS - VARIANCES ARE UNKNOWN LARGE SAMPLES The Key:The (1- ) CI for the normal mean 1 2 is:Prepared by Narinderjit Singh Confidence Interval Probability & Statistics15 16. Example 7: 60 pieces of each type of thread are tested under similar conditions. Type A thread had an average tensile strength of 86.7 kgs with a SD of 6.15 kgs, while type B had an average tensile strength of 77.8 kgs with a SD of 5.82 kgs. Find the 90% CI for the difference in mean A- B.Solution: Problem: CI for the difference in mean 1- 2 of two random variables, unknown variances, large samples Apply [ (X X ) , (X X ) + ] , where = z S + S 2ABAB2A 2BnAnB1- = 0.90, = 0.10, /2 = 0.05 z /2 = z 0.05 = 1.645 x A = 86.7, x B = 77.8 , sA = 6.15, sB = 5.82, nA = 60, nB = 60 Calculate2 =z 22SA SB 6.15 2 5.82 2 + = (1.645) + = 1.798 nA nB 60 60(X A X B ) = (86.7 77.8) 1.798 = 7.102, (X A X B ) + = (86.7 77.8) + 1.798 = 10.698Answer: The 90% CI for the difference in mean A- B of cold-rolled steel strength is [7.102, 10.698] Prepared by Narinderjit Singh Confidence Interval Probability & Statistics16 17. CI FOR ANY TWO MEANS - VARIANCES ARE UNKNOWN SMALL SAMPLES 21 = 2The Key:2( X1 X 2 ) ( 1 2 ) T= ~ t(n1 + n 2 2) S p 1/n 1 +1/n 2 2Sp =2S 1 (n1 1) + S 2 (n 2 1) , n 1 , n 2 < 30 n1 +n 2 2The (1- ) CI for the normal mean 1 2 is: [ (X1 X 2 ) , (X1 X 2 ) + ] , where = t ,n1 + n 2 2 S p 2Prepared by Narinderjit Singh Confidence Interval Probability & Statistics1 1 + n1 n 2 17 18. CI FOR ANY TWO MEANS - VARIANCES ARE UNKNOWN SMALL SAMPLES 21 2 The Key:T=( X1 X 2 ) ( 1 2 ) 2~ t(v)2S1 /n 1 + S 2 /n 2 222(S1 /n1 + S 2 /n 2 ) 2 v= , n1 , n 2 < 30 2 2 2 2 (S1 /n1 ) /(n1 1) + (S 2 /n 2 ) /(n 2 1)The (1- ) CI for the normal mean 1 2 is: 2[ (X1 X 2 ) , (X1 X 2 ) + ] , where = t , v 2Prepared by Narinderjit Singh Confidence Interval Probability & Statistics2S1 S 2 + n1 n 218 19. CI FOR VARIANCE OF NORMAL R V Key: Therefore the (1- ) CI for 2 is:Prepared by Narinderjit Singh Confidence Interval Probability & Statistics19 20. Example 8: A hardware manufacturer produces 10-mm bolts. The diameters (mm) of a sample of 12 bolts, give a sample variance 0.0026 & sample mean 9.975. Find a 90% CI for 2 and for . Suppose the bold diameter is normally distributed. Solution: Problem: CI for 2 of bolt diameters. The diameters are Normally S 2 (n 1) S 2 ( n 1) Distributed , Apply 2 2 ,n 1 21 ,n 1 2Given Sample Data: n = 12, S2 = 0.0026 1 - = 0.90, = 0.10, /2 = 0.05, 1 - /2 = 0.95 X 20.05,11 = 19.675; X 20.95,11 = 4.575 Calculations: (n 1) S 2 / 2, n 1 = 0.00145 , (n 1) S 2 / 12 , n 1 = 0.00625 Answer: The 90% CI for the proportion variance of bolt 22diameters is [0.00145; 0.00625] mm2 Prepared by Narinderjit Singh Confidence Interval Probability & Statistics20 21. Problem: CI for the mean of diameters, X. X: Normally Distributed Variance is unknown Apply [ X , X +] , where =t ( S / n ) Given: size n = 12, Standard Deviation, S = 0.0510, x = 9.975 mm 1 - = 0.90, = 0.10, / 2 = 0.05, t = 1.796 Calculate: , n 1 20.05, 11 = t ,n 1 ( S / n ) = (1.796)(0.0510 / 12 ) = 0.0264 , x = 9.975 2x = 9.975 0.0264 = 9.949 ; Answer: The 90% CI for isx + = 10.001[9.949, 10.001] mm.Prepared by Narinderjit Singh Confidence Interval Probability & Statistics21 22. SUMMARY OF CHAPTER 6CONFIDENCE INTERVALS NOTION: (1 - ) CONFIDENCE INTERVAL CI FOR NORMAL POPULATION MEAN CI FOR ANY POPULATION MEAN : LARGE SAMPLE CI FOR PROPORTION (OR PROBABILITY) p CI FOR NORMAL TWO POPULATION MEANS CI FOR NORMAL POPULATION VARIANCE 2 Prepared by Narinderjit Singh Confidence Interval Probability & Statistics22