Presentation is loading. Please wait.

Presentation is loading. Please wait.

Objectives (PSLS Chapter 18)

Similar presentations


Presentation on theme: "Objectives (PSLS Chapter 18)"— Presentation transcript:

1 Objectives (PSLS Chapter 18)
Comparing two means (σ unknown) Two-sample situations t-distribution for two independent samples Two-sample t test Two-sample t confidence interval Robustness

2 Two samples situations
We may need to compare 2 treatments or 2 conditions. It is important to determine if the 2 samples are independent or not. Independent samples: the individuals in both samples are chosen separately (“independently”)  Chapter 18 Matched pairs samples: the individuals in both samples are related (for example, the same subjects assessed twice, or siblings)  Chapter 17

3 t distribution for 2 independent samples
We have 2 independent SRSs coming from 2 populations with (m1,s1) and (m2,s2) unknown. We use ( 1,s1) and ( 2,s2) to estimate (m1,s1) and (m2,s2) respectively. Both populations should be Normally distributed. In practice, it is enough that both distributions have similar shapes and that the sample data contain no strong outliers.

4 The degrees of freedom of the t distribution are computed as follows:
The two-sample t statistic follows approximately a t distribution with a standard error SE (denominator) reflecting variation from both samples. The degrees of freedom of the t distribution are computed as follows: In practice, use technology to obtain the degrees of freedom. If technology is not an option, first compute the standard error of the mean for each sample; this makes it easier to compute the degrees of freedom.

5 Two-sample t test If you have 2 independent random samples and want to test H0: m1 = m2 <=> m1 − m2 = 0 with either a one-sided or a two-sided alternative hypothesis: Compute the t statistic and appropriate df. Obtain and interpret the P-value (one- or two-sided, depending Ha).

6 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 for a sample of children exposed to parental smoking. Parental smoking Mean FVC s n Yes 75.5 9.3 30 No 88.2 15.1 Is the mean FVC lower in the population of children exposed to parental smoking? We test: H0: msmoke = mno <=> (msmoke − mno) = 0 Ha: msmoke < mno <=> (msmoke − mno) < 0 (one-sided)

7 Software gives P = 0.00014, highly significant  We reject H0
Parental smoking xbar s n Yes 75.5 9.3 30 No 88.2 15.1 In Table C, for df 40, we find: |t| >  P < (one-sided) Software gives P = , highly significant  We reject H0 Lung capacity is significantly impaired in children exposed to parental smoking, compared with children not exposed to parental smoking.

8 Geckos are lizards with specialized toe pads that enable them to easily climb even slick surfaces. Researchers want to know if male and female geckos differ significantly in the size of their toe pads. In a random sample of Tokay geckos, they find that the mean toe pad area is 6.0 cm2 for the males and 5.3 cm2 for the females. What is the appropriate null hypothesis here? . - Statistical hypotheses are always statements about parameters, not statistics (A and B are therefore obviously wrong). There are 2 independent random samples, therefore we are comparing 2 populations each with their own mean. And the sample findings should never be found in the null and alternative hypotheses. - The research question calls for a two-sided (two-tailed) alternative [“differ significantly”]. Should the alternative hypothesis be one-side or two-sided?

9 Two sample t-confidence interval
Because we have 2 independent samples we use the difference between both sample averages to estimate (m1 − m2). C is the area between −t* and t* Find t* in the line of Table C for the computed degrees of freedom The margin of error m is: C t* −t* m m

10 A 95% confidence interval for (µ1 - µ2) is:
How does pesticide help seedling growth? Seeds are randomly assigned to be planted in pots with soil treated with pesticide or in pots with untreated soil. Seedling growth (in mm) is recorded after 2 weeks. A 95% confidence interval for (µ1 - µ2) is: Using df = 30 from Table C, we get: When using Table C, we need to use df = 30 because the table does not have a row for df = 37 or df = 38. Note that technology (next slide) uses the computed value for df, which can lead to slightly different results (usually not much beyond rounding error). Table C

11 R example > trt = c(24,61,59,46,43,44,52,43,58,67,62,57,71,49,54,43,53,57,49,56,33) > ctrol = c(42,33,46,37,43,41,10,42,55,19,17,55,26,54,60,28,62,20,53,48,37,85,42) > t.test(trt,ctrol) Welch Two Sample t-test data: trt and ctrol t = , df = , p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean of x mean of y

12 Robustness The two-sample t-statistic is most robust when both sample sizes are equal and both sample distributions are similar. But even when we deviate from this, two-sample t-tests tend to remain quite robust. As a guideline, a combined sample size (n1 + n2) of 40 or more will allow you to work even with the most skewed distributions. Plotting the data in a histogram, dotplot, stemplot, or Normal quantile plot will help you determine whether the data show evidence of deviations from Normality.

13 Avoid the pooled two-sample t procedures
There are two versions of the two-sample t procedures: one assuming equal variance (“pooled”) and one not assuming equal variance for the two populations. They have slightly different formulas and df. The pooled (equal variance) two-sample t test has degrees of freedom n1 + n2 − 2. However, the assumption of equal variance is hard to check, and thus the unequal variance test is safer. Note that the pooled two-sample t test is mathematically equivalent to the ANOVA F test, which asks whether the difference between the two (or more) samples can be explained simply by chance variations when sampling from a unique population. Two Normally distributed populations with unequal variances

14 REVIEW: t procedures mdiff One-sample t procedure
One sample summarized by its mean x̅ and standard deviation s. Population parameters m and s unknown. Inference about Matched pairs t procedure Two paired datasets (from a matched-pairs design). From the n pairwise differences we compute Population parameters mdiff and sdiff unknown. Two-sample t procedure Two independent samples (unrelated individuals in the two samples). We summarize each sample separately with Population parameters m1 , s1 , m2 , s2 unknown. mdiff

15 Which type of t inference procedure
Which type of t inference procedure? A: one sample, B: matched pairs, C: two samples ? Does bread lose vitamin with storage? Take a sample of bread loaves and compare vitamin content right after baking and again after 3 days later. Does bread lose vitamin with storage? Take a sample of bread loaves just baked and a sample of bread loaves stored for 3 days and compare vitamin content. Is blood pressure altered by use of an oral contraceptive? Comparing a sample of women not using an OC with a sample of women taking it. Average cholesterol level in general adult population is 175 mg/dl. Take a sample of adults with ‘high cholesterol’ parents. Is the mean cholesterol level higher in this population? Top left: two sample t Bottom left: one sample t Top right: matched pairs t (each bread loaf is measured twice) Bottom right: two sample t

16 Table C


Download ppt "Objectives (PSLS Chapter 18)"

Similar presentations


Ads by Google