Stat 104 – Lecture 29 Two Sample Data Dependent Samples Independent Samples

advertisement
Stat 104 – Lecture 29
Two Sample Data
• Dependent samples
–Data are connected.
• Independent samples
–Data are separate.
1
Dependent Samples
• Paired data
–One set of individuals.
–Two values of the response
variable (a pair of values) for
each individual.
2
Independent Samples
• Two separate sets of
individuals.
• One value of the response
variable for each individual.
3
1
Stat 104 – Lecture 29
Know the Difference
• It is important to know the
difference between data arising
from two independent samples
and data arising from dependent
(paired) samples.
4
Alcohol and Reaction Time
• Dependent (paired) samples
– One set of individuals
– Each individual has reaction time
measured after consuming a glass of
grape juice and again after
consuming a glass of grape juice
with 2 oz of 190 proof alcohol.
5
Alcohol and Reaction Time
• Independent samples
– Two separate sets of individuals.
– One set has reaction time measured after
consuming a glass of grape juice.
– The other set has reaction time measured
after consuming a glass of grape juice
with 2 oz of 190 proof alcohol.
6
2
Stat 104 – Lecture 29
Alcohol and Reaction Time
• Dependent (paired) samples
–One set of 12 individuals
–Each individual has reaction time
measured after consuming a glass
of grape juice and again after
consuming a glass of grape juice
with 2 oz of 190 proof alcohol.
7
Participant
1
2
3
4
5
6
7
8
9
10
11
12
No Alcohol
6.7
7.0
7.0
7.3
7.2
7.4
6.2
6.4
6.6
7.7
7.7
6.5
Alcohol
7.4
7.0
7.7
7.5
7.0
7.6
7.4
7.5
7.2
7.4
7.7
7.4
d=Alc – No Alc
0.7
0.0
0.7
0.2
–0.2
0.2
1.2
1.1
0.6
–0.3
0.0
0.98
Summary of Differences
n = 12
d =
(∑ d )
=
n
sd = 0.5083
5.1
= 0.425
12
9
3
Stat 104 – Lecture 29
Confidence Interval for μd
⎛
d ± t* ⎜
⎝
sd ⎞
⎟
n⎠
t* from Table T;
df = n − 1
10
Table T
df
1
2
3
4
M
2.201
11
Confidence Levels 80%
90%
95%
98%
99%
11
Confidence Interval for μd
⎛ 0.5083 ⎞
⎟
12
⎠
⎝
0.425 ± 2.201⎜
0.425 ± 2.201(0.1467 )
0.425 ± 0.323
0.102 to 0.748
12
4
Stat 104 – Lecture 29
Interpretation
• We are 95% confident that the mean
difference in reaction time is
between 0.102 and 0.748 seconds.
• On average, a person’s reaction time
increases from 0.102 to 0.748
seconds after drinking this amount
of alcohol.
13
Test of Hypothesis for μd
• Step 1: Set – up
H 0 : μd = 0
H A : μd > 0
–
μ dis the mean difference in
reaction time (Alc – No Alc).
14
Test of Hypothesis for μd
• Step 2: Test Criteria
– Differences are normally distributed.
– Population standard deviation is not
known.
– t-test statistic
– α = 0.05.
15
5
Stat 104 – Lecture 29
Test of Hypothesis for μd
• Step 3: Sample evidence
t=
d −0
0.425
=
= 2.897
0.1467
⎛ sd ⎞
⎜
⎟
⎝ n⎠
16
Table T
One tail probability
0.01 P-value 0.005
df
1
2
3
4M
11
2.718 2.897 3.106
17
Test of Hypothesis for μd
• Step 4: Probability value
–The P-value is between
0.005 and 0.01.
18
6
Stat 104 – Lecture 29
Test of Hypothesis for μd
• Step 5: Results
–Reject the null hypothesis
because the P-value is smaller
than α = 0.05
–With alcohol the reaction time is
longer, on average.
19
Comment
• This agrees with the confidence
interval. Zero was not in the
confidence interval and so zero
is not a plausible value for the
population mean difference.
20
JMP
• Data in two columns
–Reaction time with no alcohol.
–Reaction time with alcohol.
• Create a new column of
differences
–Cols – Formula
21
7
Stat 104 – Lecture 29
JMP
• Analysis – Distribution
–Differences
• JMP Starter – Basic
–Matched Pairs
22
Analysis - Distribution
Distributions
Difference
Moments
Mean
Std Dev
Std Err Mean
upper 95% Mean
lower 95% Mean
N
Test Mean=value
0.425
0.5083395
0.146745
0.7479835
0.1020165
12
Hypothesized Value
Actual Estimate
df
Std Dev
Test Statistic
Prob > |t|
Prob > t
Prob < t
0
0.425
11
0.50834
t Test
2.8962
0.0145
0.0073
0.9927
23
Matched Pairs
Matched Pairs
Difference: Alcohol-No Alcohol
Alcohol
No Alcohol
Mean Difference
Std Error
Upper95%
Lower95%
N
Correlation
7.4
6.975
0.425
0.14674
0.74798
0.10202
12
0.20195
t-Ratio
DF
Prob > |t|
Prob > t
Prob < t
2.896181
11
0.0145
0.0073
0.9927
24
8
Download