Stat 104 – Lecture 28 Two Sample Data Independent Samples

advertisement
Stat 104 – Lecture 28
Two Sample Data
• Independent samples
–Data are separate.
• Dependent samples
–Data are connected.
1
Independent Samples
• Two separate sets of
individuals.
• One value of the response
variable for each individual.
2
Dependent Samples
• Paired data
–One set of individuals.
–Two values of the response
variable (a pair of values) for
each individual.
3
1
Stat 104 – Lecture 28
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
• 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.
5
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.
6
2
Stat 104 – Lecture 28
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 d=Alc – No Alc
7.4
0.7
7.0
0.0
7.7
0.7
7.5
0.2
7.0
–0.2
7.6
0.2
7.4
1.2
7.5
1.1
7.2
0.6
7.4
–0.3
7.7
0.0
8
7.4
0.9
Summary of Differences
n = 12
yd =
(∑ yd ) = 5.1 = 0.425
n
sd = 0.5083
12
9
3
Stat 104 – Lecture 28
Confidence Interval for μd
⎛s ⎞
yd ± t*⎜ d ⎟
⎝ n⎠
t* fromTableT;
df = n − 1
10
Table T
80%
Confidence Levels
90% 95% 98%
99%
df
1
2
3
4
M
11
2.201
11
Confidence Interval for μd
⎛ 0.5083 ⎞
0.425 ± 2.201⎜
⎟
12
⎝
⎠
0.425 ± 2.201(0.1467 )
0.425 ± 0.323
0.102 to 0.748
12
4
Stat 104 – Lecture 28
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: Assumptions.
–Paired data.
–Randomization.
–Differences are approximately
normally distributed.
14
Test of Hypothesis for μd
• Step 2: Hypotheses
H 0 : μd = 0
H A : μd > 0
– μ d is the mean difference in
reaction time (Alc – No Alc).
15
5
Stat 104 – Lecture 28
Test of Hypothesis for μd
• Step 3: Test Statistic.
y − 0 0.425
=
= 2.897
t= d
⎛ sd ⎞ 0.1467
⎜
⎟
⎝ n⎠
16
Table
T
Right-Tail probability
0.01 P-value 0.005
df
1
2
3
4
M
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 28
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 28
JMP
• Analysis – Distribution
–Differences
• JMP Starter – Basic
–Matched Pairs
22
Analysis - Distribution
Distributions
Difference
Moments
Test Mean=value
Mean
Std Dev
Std Err Mean
upper 95% Mean
lower 95% Mean
N
0.425
0.5083395
0.146745
0.7479835
0.1020165
12
Hypothesized Value
Actual Estimate
df
Std Dev
0
0.425
11
0.50834
t Test
2.8962
0.0145
0.0073
0.9927
Test Statistic
Prob > |t|
Prob > t
Prob < t
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