Two-sample T Test - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Two-sample T Test

Description:

... variance for the two populations. The two samples are independent. The 2 sample t test with pooled variance is ... variance when the sample sizes are equal ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 21
Provided by: marcell7
Category:
Tags: sample | test | two | variance

less

Transcript and Presenter's Notes

Title: Two-sample T Test


1
Two-sample T Test
Topic 12
2
Recall one sample t test
If the general population mean is unknown, we
need to take a second sample from it
3
Two sample t
Population (Normal) Population (Normal) Population (Normal) Population (Normal) Population (Normal)
T-treatment T-treatment C-control C-control







4
Two sample t
Population (Normal) Population (Normal) Population (Normal) Population (Normal) Population (Normal)
T-treatment T-treatment C-control C-control


Two independent samples Two independent samples Two independent samples Two independent samples Two independent samples
nT nC

sT sC

5
(No Transcript)
6
Standardized Difference
7
The case of equal variance
8
2 sample t test (assuming equal variance)
9
t-test for 2 independent samples
Null Hypothesis No difference in mean blood PH
levels between battery workers and control
group i.e. Ho m battery m control Alternative
Hypothesis H1 m battery gt m control because
battery workers are occupationally
exposed. One-sided test
  • Blood PH concentrations
  • Battery workers Control
  • (occupationally (not
    occupationally exposed)
    exposed)
  • 0.082 0.040
  • 0.080 0.035
  • 0.079 0.036
  • 0.069 0.039
  • 0.085 0.040
  • 0.090 0.046
  • 0.086 0.040
  • Mean 0.08157 0.03943
  • Variance 0.00004495 0.00001262

10
t-test for 2 independent samples
From data Difference.08157-.03943.04214 Sp(6X.
000044956X.00001262) 12 0.00002879 SE
Sp X sqrt(1/71/7) 0.002868 T
standardized difference .04214/.002868
14.7 with 12 df
  • Blood PH concentrations
  • Battery workers Control
  • (occupationally (not
    occupationally exposed)
    exposed)
  • 0.082 0.040
  • 0.080 0.035
  • 0.079 0.036
  • 0.069 0.039
  • 0.085 0.040
  • 0.090 0.046
  • 0.086 0.040
  • Mean 0.08157 0.03943
  • Variance 0.00004495 0.00001262

2
11
t-test for 2 independent samples
Question If there were really no difference in
the mean PH level of the 2 groups, what is the
probability that the standardized difference
between the 2 sample means will be 14.7 or more
due to chance alone?
  • Blood PH concentrations
  • Battery workers Control
  • (occupationally (not
    occupationally exposed)
    exposed)
  • 0.082 0.040
  • 0.080 0.035
  • 0.079 0.036
  • 0.069 0.039
  • 0.085 0.040
  • 0.090 0.046
  • 0.086 0.040
  • Mean 0.08157 0.03943
  • Variance 0.00004495 0.00001262

Answer 1-sided p-value Pr(t12gt14.7)
lt 0.0005
12
Upper percentiles of t-distributions
  Probability df .025 .01 .
005 .0005 ----------------------------------------
-------------- 11 2.201 2.718 3.106 4.437 12 2.1
79 2.681 3.055 4.318 13 2.160 2.650 3.012 4.221
14 2.145 2.624 2.977 4.140 15 2.131 2.602 2.947 4
.073
From our example t14.7 with 12 d.f.
Value far exceeds 4.318, the upper
0.05-percentile of the t-distribution with 12
df i.e. Pr lt 0.0005
13
t-test for 2 independent samples
Conclusion Since p-value lt 0.001, it is
extremely unlikely that the observed difference
is due to chance or sampling error alone.This
suggests that there could be a real difference
and there is some evidence that the battery
workers may have a higher mean blood PH
concentration.
  • Blood PH concentrations
  • Battery workers Control
  • (occupationally (not
    occupationally exposed)
    exposed)
  • 0.082 0.040
  • 0.080 0.035
  • 0.079 0.036
  • 0.069 0.039
  • 0.085 0.040
  • 0.090 0.046
  • 0.086 0.040
  • Mean 0.08157 0.03943
  • Variance
    0.00004495 0.00001262

14
(No Transcript)
15
Assumptions
  • PH levels normally distributed
  • Equal variance for the two populations
  • The two samples are independent

The 2 sample t test with pooled variance is quite
robust to non-normality and unequal variance when
the sample sizes are equal
If the sample sizes are quite different, the test
will be affected by unequal variance and should
be used with caution
16
Topic 13 Paired T Test
17
Blood samples from 11 individuals were collected
before and after they smoked a cigarette and the
of blood platelet aggregation recorded
18
Advantages of pairing
  • Since the same person acts as his/her own
    control, the observed difference is more likely
    to be due to treatment rather than by chance or
    other factors
  • Effect of confounding factors minimized or
    controlled for
  • Cut down extraneous source of variation.
    Difference between 2 measurements of the same
    individual is typically less variable than the
    difference in measurements between 2 individuals
  • Higher precision for estimating the mean
    difference, resulting in a more powerful t-test

19
Why 2-sample t test not applicable to paired data?
  • The two observations within the same pair are
    likely to be positively correlated, violating the
    assumption of independence
  • SE for observed difference obtained assuming
    independence over-estimates the true SE, making
    the standardized difference smaller than it
    should be

Simple Remedy Take difference within each pair
and apply 1-sample t test to the differences
20
(No Transcript)
21
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com