Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 6 Outline: Tue, Sept 23 Review chapter 2.2 –Confidence Intervals Chapter 2.3 –Case Study 2.1.1 –Two sample t-test –Confidence Intervals Testing.

Similar presentations


Presentation on theme: "Lecture 6 Outline: Tue, Sept 23 Review chapter 2.2 –Confidence Intervals Chapter 2.3 –Case Study 2.1.1 –Two sample t-test –Confidence Intervals Testing."— Presentation transcript:

1 Lecture 6 Outline: Tue, Sept 23 Review chapter 2.2 –Confidence Intervals Chapter 2.3 –Case Study 2.1.1 –Two sample t-test –Confidence Intervals Testing for equal variances (Chapter 4.5.3)

2 Notes on Homework #1. Finding quartiles: –The stem and leaf plot provides an ordered list of the observations in increasing order –The first quartile is the median of the observations whose position in the ordered list is to the left (to the top in stem-and-leaf plot) of the overall median –The third quartile is the median of the observations whose position in the ordered list is to the right (to the bottom in stem-and-leaf plot) of the overall median. #3. Unemployment Spells.

3 One-sample t-tools and paired t-test Testing hypotheses about the mean difference in pairs is equivalent to testing hypotheses about the mean of a single population Probability model: Simple random sample with replacement from population. Test statistic:

4 p-value Fact: If H 0 is true, then t has the Student’s t-distribution with n-1 degrees of freedom Can look up quantiles of t-distribution in Table A.2. The (2-sided) p-value is the proportion of random samples with absolute value of t >= observed test statistic T o =|t o | if H 0 is true. Schizophrenia example: t o =3.23, p-value = Prob>|t| =.0061. The reliability of the p-value (as the probability of observing as extreme a test statistic as the one actually observed if H 0 is true) is only guaranteed if the probability model of random sampling is correct – if the data is collected haphazardly rather than through random sampling, the p-value is not reliable.

5 One-sided tests One-sided alternatives: H 1 :, H 1 :, Two- sided alternative: H 1 : Choice of one-sided or two-sided depends on how specifically the researcher can pinpoint the alternative. Always report whether p-value is one-or-two- sided. One-sided test: H 1 : –Test statistic: –For schizophrenia example, t=3.21, p-value (1-sided) =.003

6 p-value animation

7 Confidence Interval for A confidence interval is a range of “plausible values” for a statistical parameter (e.g., the population mean) based on the data. It conveys the precision of the sample mean as an estimate of the population mean. A confidence interval typically takes the form: point estimate margin of error The margin of error depends on two factors: –Standard error of the estimate –Degree of “confidence” we want.

8 CI for population mean If the population distribution of Y is normal (* we will study the if part later) 95% CI for mean of single population: For schizophrenia data:

9 Interpretation of CIs A 95% confidence interval will contain the true parameter (e.g., the population mean) 95% of the time if repeated random samples are taken. It is impossible to say whether it is successful or not in any particular case, i.e., we know that the CI will usually contain the true mean under random sampling but we do not know for the schizophrenia data if the CI (0.067cm 3,0.331cm 3 ) contains the true mean difference. The accuracy of the confidence interval is only guaranteed if the probability model is correct – if the data is collected haphazardly rather than through random sampling, the confidence interval is not reliable

10 Matched Pairs in JMP Click Analyze, Matched Pairs, put two columns (e.g., affected and unaffected) into Y, Paired Response. Can also use one-sample t-test. Click Analyze, Distribution, put difference into Y, columns. Then click red triangle under difference and click test mean. For both methods of doing paired t-test (Analyze, Matched Pairs or Analyze, Distribution), the 95% confidence intervals for the mean are shown on the output.

11 Case Study 2.1.1 Background: During a severe winter storm in New England, 59 English sparrows were found freezing and brought to Bumpus’ laboratory – 24 died and 35 survived. Broad question: Did those that perish do so because they lacked physical characteristics enabling them to withstand the intensity of this episode of selective elimination? Specific questions: Do humerus (arm bone) lengths tend to be different for survivors than for those that perished? If so, how large is the difference?

12 Structure of Data Two independent samples Observational study – cannot infer a causal relationship between humerus length and survival Sparrows were not collected randomly. Fictitious probability model: Independent simple random samples with replacement from two populations (sparrows that died and sparrows that survived). See Display 2.7

13 Two-sample t-test Population parameters: H 0 :, H 1 : Equal spread model: (call it ) Statistics from samples of size n 1 and n 2 from pops. 1 and 2: For Bumpus’ data:

14 Sampling Distribution of (equal spread model) Pooled estimate of : See Display 2.8

15 Two sample t-test H 0 :, H 1 : Test statistic: T= If population distributions are normal with equal, then if H 0 is true, the test statistic t has a Student’s t distribution with degrees of freedom. p-value equals probability that T would be greater than observed |t| under random sampling model if H 0 is true; calculated from Student’s t distribution. For Bumpus data, two-sided p-value =.0809, suggestive but inconclusive evidence of a difference

16 One-sided p-values If H 1:, test statistic is If H 1:, test statistic is p-value is probability that T would be >= observed T 0 if H 0 is true

17 Confidence Interval for 100(1- )% confidence interval for : For 95% confidence interval, Factors affecting width of confidence interval: –Sample size –Population standard deviation –Level of confidence

18 Two sample tests and CIs in JMP Click on Analyze, Fit Y by X, put Group variable in X and response variable in Y, and click OK Click on red triangle next to Oneway Analysis and click Means/ANOVA/t-test To see the means and standard deviations themselves, click on Means and Std Dev under red triangle

19 Bumpus’ Data Revisited Bumpus concluded that sparrows were subjected to stabilizing selection – birds that were markedly different from the average were more likely to have died. Bumpus (1898): “The process of selective elimination is most severe with extremely variable individuals, no matter in what direction the variations may occur. It is quite as dangerous to be conspicuously above a certain standard of organic excellence as it is to be conspicuously below the standard. It is the type that nature favors.” Bumpus’ hypothesis is that the variance of physical characteristics in the survivor group should be smaller than the variance in the perished group

20 Testing Equal Variances Two independent samples from populations with variances and H 0 : vs. H 1 : Levene’s Test – Section 4.5.3 In JMP, Fit Y by X, under red triangle next to Oneway Analysis of humerus by group, click Unequal Variances. Use Levene’s test. p-value =.4548, no evidence that variances are not equal, thus no evidence for Bumpus’ hypothesis.


Download ppt "Lecture 6 Outline: Tue, Sept 23 Review chapter 2.2 –Confidence Intervals Chapter 2.3 –Case Study 2.1.1 –Two sample t-test –Confidence Intervals Testing."

Similar presentations


Ads by Google