Download ppt

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Degrees of freedom (statistics) wikipedia , lookup

Sufficient statistic wikipedia , lookup

History of statistics wikipedia , lookup

Foundations of statistics wikipedia , lookup

Bootstrapping (statistics) wikipedia , lookup

Taylor's law wikipedia , lookup

Resampling (statistics) wikipedia , lookup

Misuse of statistics wikipedia , lookup

Student's t-test wikipedia , lookup

Transcript
Review
As sample size increases, the distribution of sample means
A.
B.
C.
D.
Becomes wider and more normally shaped
Becomes narrower and more normally shaped
Becomes wider and less normally shaped
Becomes narrower and less normally shaped
Review
A population has a mean of µ = 10 and a standard deviation of s = 5.
You plan to sample 100 people.
What’s the expected value of your sample mean, M?
A.
B.
C.
D.
0.5
1
5
10
Review
A population has a mean of µ = 10 and a standard deviation of s = 5.
You plan to sample 100 people.
The expected (average) value of M is equal to µ,
but M for any specific sample will be off, either too high or too low.
How far from µ will the sample mean typically be?
A.
B.
C.
D.
0.5
1
5
10
One-sample t-test
10/7
Hypothesis Test for Population Mean
• Goal: Infer m from M
• Null hypothesis (H0): m = m0
– Usually 0
– Sometimes another value, e.g. from larger population
• Change scores
– Memory improvement, weight loss, etc.
• Sub-population within known, larger population
– IQ of CU undergrads
• Approach:
– Determine likelihood function for M, using CLT
– Compare actual sample mean to critical value
Likelihood Function for M
• Probability distribution for M, according to H0
• Central Limit Theorem:
– Mean equals population mean: mM = m0
– Standard deviation: s M = sn
– Shape: Normal
Probability
p(M)
sM
m0
Critical Value for M
• Result that has 5% (a) chance of being exceeded,
IF null hypothesis is true
• Easier to find after standardizing p(M)
– Convert distribution of sample means to z-scores:
M -m M
sM
zM =
• Critical value for zM always the same
=
– Just use qnorm()
– Equals 1.64 for a = 5%
p(zM)
sM
a
m0
Mcrit
Probability
Probability
p(M)
1
a
0
zcrit
M -m 0
s
n
Example: IQ
• Are CU undergrads smarter than population?
– Sample size n = 100, sample mean M = 103
• Likelihood function
– If no difference, what are probabilities of sample means?
– Null hypothesis: m0 = 100
– CLT: mM = 100
sM = s/√n = 15/10 = 1.5
94
96
98
100
102
z * 1.5 + 100
M
104
106
0.0 0.1 0.2 0.3 0.4
p
0.10
0.00
p/1.5
0.20
• z-score: (103-100)/1.5 = 2
-4
-2
0
z
zcrit 2
zM
4
Problem: Unknown Variance
zM =
M - m0
s
n
?
• Test statistic depends on population parameter
– Can only depend on data or values assumed by H0
• Could include s in null hypothesis
– H0: m = m0 & s = s0
– Usually no theoretical basis for choice of s0
– Cannot tell which assumption fails
• Change test statistic
– Replace population SD with sample SD
– Depends only on data and m0
M - m0
– .t =
s
n
t Statistic
• Invented in 1908 by “Student” at Guinness brewery
• .t =
M - m0
s
n
• Deviation of sample mean divided by estimated standard error
• Depends only on data and m0
• Sampling distribution depends only on n
( M - m0 )
t=
t n-1 =
Normal(0,1)× s
n
Normal(0,1)
2
c n-1
n-1
n -1
0.1
×s
0.0
2
c n-1
0.00 0.02 0.04 0.06
0.2
0.3
s
-4
0
10
20
30
40
-2
0
2
4
t Distribution
• Sampling distribution of t statistic
• Derived from ratio of Normal and (modified) c2
• Depends only on sample size
– Degrees of freedom: df = n – 1
– Invariant with respect to m, s
• Shaped like Normal, but with fatter tails
• Critical value decreases
as n increases
0.3
– Reflects uncertainty in sample variance
– Closer to Normal as n increases
df
tcrit
1
6.31
5
2.02
2
2.92
10
1.81
3
2.35
30
1.70
4
2.13
∞
1.64
0.1
tcrit
0.0
df
0.2
a = .05
-5
0
5
Steps of t-test
1. State clearly the two hypotheses
2. Determine null and alternative hypotheses
• H0: m = m0
• H1: m ≠ m0
3. Compute the test statistic t from the data
M - m0
• t. =
s
n
4. Determine likelihood function for test statistic according to H0
• t distribution with n-1 degrees of freedom
5. Find critical value
• R: qt(alpha,n-1,lower.tail=FALSE)
6. Compare actual result to critical value
• t < tcrit: Retain null hypothesis, μ = μ0
• t > tcrit: Reject null hypothesis, μ ≠ μ0
Example: Rat Mazes
• Measure maze time on and off drug
– Difference score: Timedrug – Timeno drug
– Data (seconds): 5, 6, -8, -3, 7, -1, 1, 2
•
•
•
•
•
•
Sample mean: M = 1.0
Sample standard deviation: s = 5.06
Standard error: SE = s/√n = 5.06/2.83 = 1.79
t = (M – m0)/SE = (1.0 – 0)/1.79 = .56
Critical value: qnorm(.05,7,lower.tail=FALSE) = 1.89
t does not exceed critical value
– Cannot reject null hypothesis
– Assume no effect of drug
Review
You run a t-test and get a result of t = 7. What is your conclusion?
A.
B.
C.
D.
Reject the null hypothesis because t is bigger than expected by chance
Reject the null hypothesis because t is smaller than expected by chance
Keep the null hypothesis because t is bigger than expected by chance
Keep the null hypothesis because t is smaller than expected by chance
Review
You run a t-test and get a result of t = 2. What does the value of 2 mean in this
case?
A.
B.
C.
D.
The alternative hypothesis is twice as likely to be true as the null hypothesis
The sample mean is twice as far from µ0 as you would expect by chance
The population mean is likely within ±2 of the sample mean
Your chance of a Type I error will double if you reject the null hypothesis
Review
Your null hypothesis predicts the population mean should be µ0 = 0.
You measure 16 people and calculate statistics of M = 4 and s = 32.
What is the value of your t statistic?
A.
B.
C.
D.
2
0.5
0.25
4