1 / 43

Chapter 7

Chapter 7. Inference for Distributions. Inference for the mean of a population. So far, we have assumed that s was known . If s is unknown , we can use the sample standard deviation (s), to estimate s .

rangle
Download Presentation

Chapter 7

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 7 Inference for Distributions

  2. Inference for the mean of a population • So far, we have assumed that s was known. • If s is unknown, we can use the sample standard deviation (s), to estimate s. • But this adds more variability to our test statistic and/or confidence interval (therefore, we will use the t-table). • If s is known, then s /n is known as standard deviation of x. • If s is not known, then s/n is known as standard error of x. • When s is not known, we use the t-table (Table D) instead of the Normal Table A (or say Z-table).

  3. The t-distribution When n is very large, s is a very good estimate of s and the corresponding t distributions are very close to the normal distribution. The t distributions become wider for smaller sample sizes, reflecting the lack of precision in estimating s from s. Need degree of freedom (say: df). In the “one sample problem with sample size n”, df = n-1. As df increases, the t-distribution gets closer to the standard normal. Table for t-distribution is Table D or use tcdf(start, end, df)

  4. How to find the p-value for t-distribution with TI83? • pressing [2nd] [VARS].tcdf(start, end, df), where df=degree-freedom • Select [6:tcdf] • Left-tailed test (H1: μ < some number) 1.Let our test statistics be –2.05 and n =16, so df = 15. 2. The p-value would be the area to the left of –2.05 or P(t < -2.05) 3. Notice the p-value is .0291, we would type in tcdf(-E99, -2.05,15) to get the same p-value. • Right-tailed test (H1: μ > some number) 1.Let our test statistics be 2.05 and n =16, so df = 15. 2. The p-value would be the area to the right of 2.05 or P(t >2.05) 3. Notice the p-value is .0291, we would type in tcdf(2.05, E99, 15) to get the same p-value. • Two-tailed test (H1: μ ≠ some number) 1.Let our test statistics be –2.05 and n =16, so df = 15. 2. The p-value would be double the area to the left of –2.05 or 2*P(t < -2.05) 3. Notice the p-value is .0582, we would type in 2*tcdf(-E99, -2.05,15) to get the same p-value.

  5. Review: Sampling distribution of a sample mean=distribution of

  6. The confidence interval is thus: Review: Confidence levels s is known Confidence intervals contain the population mean m in C% of samples. Different areas under the curve give different confidence levels C. z*: • z* is related to the chosen confidence level C. • C is the area under the standard normal curve between −z* and z*. C −z* z* Example: For an 80% confidence level C, 80% of the normal curve’s area is contained in the interval.

  7. Sampling distribution of a sample mean=distribution of when s is unknown

  8. Confidence Interval when s is unknown • When s is unknown, the confidence interval is given as In order to find t*, we need to use Table D: Eg: find out t critical value with confidence level 95% and df=25. Key: t*=2.060; C

  9. Confidence Interval when s is unknown • When s is unknown, the confidence interval is given as In order to find t*, we need to use Table D: 1.find out t critical value with confidence level 90% and df 10. 2.find out t critical value with confidence level 95% and df 15. 3.find out t critical value with confidence level 99% and df 20. • Key: • t*=1.812; • t*=2.131; • t*=2.845.

  10. When σ is unknown, we use a t distribution with “n−1” degrees of freedom (df). Table D shows the z-values and t-values corresponding to landmark P-values/ confidence levels. When σ is known, we use the normal distribution and the standardized z-value. Table D

  11. Example 1: Confidence intervals for m Ex2: A random sample of 16 school-age girls were selected, their average time per weekday spent on housework is 14 minutes with sample SD 8.6 minutes. Construct a 95% CI for the average time spent on housework of school-age girls in the nation. EX2: (9.418, 18.582);

  12. Example 2: Confidence intervals for m Ex3: The average lifetime of 9 randomly selected certain brand TVs is 20 years with sample SD 2 years. Construct a 99% CI for the average lifetime of all TVs from this brand. EX3: (17.763, 22.237).

  13. Example 3: Red wine, in moderation Drinking red wine in moderation may protect against heart attacks. The polyphenols it contains act on blood cholesterol and thus are a likely cause. To see if moderate red wine consumption increases the average blood level of polyphenols, a group of nine randomly selected healthy men were assigned to drink half a bottle of red wine daily for two weeks. Their blood polyphenol levels were assessed before and after the study, and the percent change is presented here: Q: What is the 95% confidence interval for the average percent change? Firstly: Are the data approximately normal? There is a low value, but overall the data can be considered reasonably normal.

  14. What is the 95% confidence interval for the average percent change? (…) Sample average = 5.5; s = 2.517; df = n − 1 = 8 The sampling distribution is a t distribution with n − 1 degrees of freedom. For df = 8 and C = 95%, t* = 2.306. 95% CI for average percent change is: x +t*s/√n = 5.5 +2.306*2.517/√9 =[ 3.565, 7.435 ].

  15. The one-sample t-test (5 steps) • Stating H0 versus Ha. • Choosing a significance level a • Calculating and df = n-1. (ASSUMING THE NULL HYPOTHESIS IS TRUE) • Finding the P-value in direction of Ha: use tcdf(start, end, df) for one-sided test or, 2*tcdf(start, end, df) for two-sided test. • Drawing conclusions: If P-value ≤ α, then we reject H0 (Enough evidence…). If P-value > α, then we do not reject H0 (No Enough evidence...).

  16. One-sided (one-tailed) Two-sided (two-tailed) The P-value is the probability, if H0 is true, of randomly drawing a sample like the one obtained or more extreme, in the direction of Ha. The P-value is calculated as the corresponding area under the curve, one-tailed or two-tailed depending on Ha:

  17. One-sample Test (Shall we use Z-test or T-test??) (Chap6)-- The National Center for Health Statistics reports that the mean systolic blood pressure for males 35 to 44 years of age is 128 with a population SD=15. The medical director of a company looks at the medical records of 72 company executives in this age group and finds that the mean systolic blood pressure in this sample is 126.07. Is this evidence that executives blood pressures are lower than the national average? (Chap7)-- The National Center for Health Statistics reports that the mean systolic blood pressure for males 35 to 44 years of age is 128. A simple random sample of 16 patients were tested, with average systolic blood pressure 120 and sample SD 12. Is this evidence that executives blood pressures are lower than the national average?

  18. One-sample Test (Shall we use Z-test or T-test??) (Chap6)-- A new medicine treating cancer was introduced to the market decades ago and the company claimed that on average it will prolong a patient’s life for 5.2 years. Suppose the SD of all cancer patients is 2.52. In a 10 years study with 64 patients, the average prolonged lifetime is 4.6 years. With normality assumption, do the 10-year study’s data show a different average prolonged lifetime? (Chap7)-- A new medicine treating cancer was introduced to the market decades ago and the company claimed that on average it will prolong a patient’s life for 5.2 years. In a 10 years study with 20 patients, the average prolonged lifetime is 4.7 years with sample SD 2.50. With normality assumption, do the 10-year study’s data show a different average prolonged lifetime?

  19. Example 3: Hypothesis testing For the following data set: 5 8 7 10 12 17 12 13 9 6 14 11 10 x = 10.308, s = 3.376 Q: Use Hypothesis Testing to test that the mean is significantly higher than 9.5.

  20. Exercises on Hypothesis Testing (t-test) 1. Because of variation in the manufacturing process, tennis balls produced by a particular machine do not have identical diameters, which is supposed to be 3in. If the average diameters of the first 36 balls made from a machine is 3.2in with sample SD 0.15in, shall we stop and calibrate the machine? 2. A new medicine treating cancer was introduced to the market decades ago and the company claimed that on average it will prolong a patient’s life for 5 years. In a 10 years study with 81 patients, the average prolonged lifetime is 4.5 years with sample SD 0.4 years. With normality assumption, shall we reject the original claim? 3. The registrar office claims that the average SAT score of UNCW students is 1050. Suppose you randomly select 100 UNCW students the SAT score average of your sample is 1042 with sample SD 80. Do you agree with the claim? 4. National data shows that on the average, college freshmen spend 7.5 hours a week going to parties. One administrator takes a random sample of 81 freshmen from her college and finds out that her students’ average hours spent on parties is 7.6 with SD 2 hours. Shall the administrator believe that the national data applies to her students?

  21. Answer: • H0 : µ = 3, Ha : µ ≠ 3; α = 5%;T=(3.2-3)/(.15/(36)^.5)=8; df=35; t-critical value= 2.04; P-value <5%;we reject H0 and we shall stop and calibrate the machine. • H0 : µ = 5, Ha : µ ≠ 5; α = 5%;T=(4.5-5)/(.4/(81)^.5)=-11.25; df=80; t-critical value= 1.99; P-value <5%;we reject H0 and we shall reject the claim that the average is 5 years. • H0 : µ = 1050,Ha :µ ≠ 1050; α = 5%;T=(1045-1050)/(80/(100)^.5)=-0.625; df=99; t-critical value= 1.984; P-value >5%;we do not H0 and we do not need to stop and calibrate the machine. • H0 : µ = 7.5, Ha : µ ≠ 7.5; α = 5%;Z=(7.6-7.5)/(2 /(81)^.5)=0.45; df=80; t-critical value= 1.99; P-value>5%;we do not reject H0 and the national data does apply.

  22. Matched pairs t proceduresfor dependent sample • Subjects are matched in “pairs” and outcomes are compared within each unit • Example: Pre-test and post-test studies look at data collected on the same sample elements before and after some experiment is performed. • Example: Twin studies often try to sort out the influence of genetic factors by comparing a variable between sets of twins. • We perform hypothesis testing on the difference in each unit

  23. Matched pairs The variable studied becomes Xdifference = (X1−X2). The null hypothesis of NO difference between the two paired groups. H0: µdifference= 0 ; Ha: µdifference>0 (or <0, or ≠0) When stating the alternative, be careful how you are calculating the difference (after – before or before – after). Conceptually, this is not different from tests on one population.

  24. Matched Pairs • If we take After – Before, and we want to show that the “After group” has increased over the “Before group” Ha: m > 0 • “After group” has decreased Ha: m < 0 • The two groups are different Ha: m≠0

  25. Example 4 Many people believe that the moon influences the actions of some individuals. A study of dementia patients in nursing homes recorded various types of disruptive behaviors every day for 12 weeks. Days were classified as moon days and other days. For each patient the average number of disruptive behaviors was computed for moon days and for other days. The data for 5 subjects whose behavior were classified as aggressive are presented as below: Moon days Other days 3.33 0.27 3.67 0.59 2.67 0.32 3.33 0.19 3.33 1.26 We want to test whether there is any difference in aggressive behavior on moon days and other days.

  26. Example 4 Many people believe that the moon influences the actions of some individuals. A study of dementia patients in nursing homes recorded various types of disruptive behaviors every day for 12 weeks. Days were classified as moon days and other days. For each patient the average number of disruptive behaviors was computed for moon days and for other days. The data for 5 subjects whose behavior were classified as aggressive are presented as below: Moon days Other days Difference 3.33 0.27 3.06 3.67 0.59 3.08 2.67 0.32 2.35 3.33 0.19 3.14 3.33 1.26 2.07 We want to test whether there is any difference in aggressive behavior on moon days and other days.

  27. Answer to Example 4 Let difference = aggressive behavior on moon days and other days. • verses , • t-statistic=12.377, df=5-1=4, • p-value=2.449*10^(-4). • Reject H0 at 5% level. • Enough evidence to conclude that there is any difference in aggressive behavior on moon days and other days

  28. Does lack of caffeine increase depression? Individuals diagnosed as caffeine-dependent are deprived of caffeine-rich foods and assigned to receive daily pills. Sometimes, the pills contain caffeine and other times they contain a placebo. Depression was assessed. • Q: Does lack of caffeine increase depression? • There are 2 data points for each subject, but we’ll only look at the difference. The sample distribution appears appropriate for a t-test.

  29. H0: mdifference = 0 ; H0: mdifference > 0 Does lack of caffeine increase depression? For each individual in the sample, we have calculated a difference in depression score (placebo minus caffeine). There were 11 “difference” points, thus df = n − 1 = 10. We calculate that = 7.36; s = 6.92 • For df = 10, p-value=0.0027. • Since p-value < 0.05, reject H0. • (2) We have enough evidence to conclude that: • Caffeine deprivation causes a significant increase in depression.

  30. Comparing two independent samples Population 1 Population 2 Sample 2 Sample 1 Independent samples: Subjects in one sample are completely unrelated to subjects in the other sample. We often compare two treatments used on independent samples. Is the difference between both treatments due to a true difference in population means?

  31. Sec 7.2 Two independent samples t distribution We have two independent SRSs (simple random samples) possibly coming from two distinct populations with (m1,s1) and (m2,s2) unknown. We use ( 1,s1) and ( 2,s2) to estimate (m1,s1) and (m2,s2), respectively. To compare the means, both populations should be normally distributed. However, in practice, it is enough that the two distributions have similar shapes and that the sample data contain no strong outliers.

  32. The two-sample t statistic follows approximately the t distribution with a standard error SE (spread) reflecting variation from both samples: Conservatively, the degrees of freedom is equal to the smallest of (n1 − 1, n2 − 1). df m1-m2

  33. Two-sample t-test The null hypothesis is that both population means m1 and m2 are equal, thus their difference is equal to zero. H0: m1 = m2 <=> m1−m2 = 0 with either a one-sided or a two-sided alternative hypothesis. We find how many standard errors (SE) away from (m1−m2) is ( 1−2) by standardizing: Because in a two-sample test H0assumes (m1−m2) = 0, we simply use With df = smallest(n1 − 1, n2 − 1)

  34. Does smoking damage the lungs of children exposed to parental smoking? Forced vital capacity (FVC) is the volume (in milliliters) of air that an individual can exhale in 6 seconds. FVC was obtained for a sample of children not exposed to parental smoking and a group of children exposed to parental smoking. We want to know whether parental smoking decreases children’s lung capacity as measured by the FVC test. Is the mean FVC lower in the population of children exposed to parental smoking?

  35. H0: msmoke = mno <=> (msmoke−mno) = 0 Ha: msmoke < mno <=> (msmoke−mno) < 0 (one sided) The difference in sample averages follows approximately the t distribution with 29 df: We calculate the t statistic: p-value=tcdf(-E99, -3.919, 29)=2.491*10^(-4),So p-value < 5%. It’s a very significant difference, we reject H0. Therefore, we have enough evidence to conclude that lung capacity is significantly impaired in children of smoking parents.

  36. Two-sample t-test Example 1. A clinical dietician wants to compare two different diets, A and B, for diabetic patients. She gets a random sample of 60 diabetic patients and randomly assign them into two equal sized groups. At the end of the experiment, a blood glucose test is conducted on each patient. The average difference in blood glucose measure from group A is 100 mg/dl with sample SD 10, and the average difference in blood glucose measure from group B is 106 mg/dl with sample SD 12. Q: Does this indicate that diet B has higher blood glucose than diet A?

  37. Two-sample t-test • H0 : µA = µB, Ha : µA < µB; α = 5%; T=(100-106)/(10^2/30+12^2/30)^.5=-2.104; df=29; • p-value=tcdf(-E99, -2.104, 29)=0.022; P-value <5%; • Therefore we reject H0, and we have enough evidence to conclude that diet B has higher blood glucose than A.

  38. Two-sample t-test Example 2. An experiment is conducted to determine whether intensive tutoring (covering a great deal of material in a fixed amount of time) is more effective than paced tutoring (covering less material in the same amount of time). Two randomly chosen groups are tutored separately and then administered proficiency tests. The sample size of the intensive group is 10 with sample average 76 and sample SD 6; The sample size of the paced group is 12 with sample average 70 and sample SD 8. Q: May we conclude that the intensive group is doing better?

  39. Two-sample t-test • H0 : µint= µpac, Ha : µint> µpac; α = 5%; T=(76-70)/(6^2/10+8^2/12)^.5=2.007; df=min(9, 11)=9; • p-value=tcdf(2.007, E99, 9)=0.038; P-value <5%; • Therefore we reject H0 and we have enough evidence to conclude that intensive group is better.

  40. Two sample t-confidence interval • The general form of the confidence interval for the population difference m1-m2: • We find t* from Table D with df = smallest (n1−1; n2−1).

  41. EX 7.14: Can directed reading activities in the classroom help improve reading ability? A class of 21 third-graders participates in these activities for 8 weeks while a control classroom of 23 third-graders follows the same curriculum without the activities. After 8 weeks, all children take a reading test (scores in table). Q: Find the 95% confidence interval for (µ1 − µ2).

  42. EX 7.14: Can directed reading activities in the classroom help improve reading ability? A class of 21 third-graders participates in these activities for 8 weeks while a control classroom of 23 third-graders follows the same curriculum without the activities. After 8 weeks, all children take a reading test (scores in table). 95% confidence interval for (µ1 − µ2), with df = 20 conservatively t* = 2.086: With 95% confidence, (µ1 − µ2), falls within 9.96 ± 8.987 or (0.973, 18.947).

  43. Two sample t-confidence interval 1. The average lifetime of 36 randomly selected TVs from brand A is 20 years with sample SD 2 years. The average lifetime of 25 randomly selected TVs from brand B is 18 years with sample SD 4 years. Construct a 95% CI for the difference of the average lifetimes between brand A and brand B. 2. In a clinical study, a new medicine is used in the treatment group with 64 patients. The new medicine can on average prolong 4 years of life with sample SD 0.75. As a comparison, the placebo group with 60 patients has an average prolonged life of 3 years with sample SD 1.2 years. Construct a 90% CI for the difference of the average lifetimes prolonged between the treatment group and the placebo group.

More Related