Title: Psychology 315: Statistics I
1Introduction to the t-test
Aron, Aron Coups, Chapter 8
2(No Transcript)
3The t-distribution
- We have made use of the z distribution (the
standard normal distribution) to do hypothesis
testing and to compute confidence intervals for
example - For hypothesis testing we can calculate
- Z (M - PopulationM ) / PopulationSDM
- and determine if Z exceeds our z-score cutoff
(e.g., 1.64) - For confidence intervals we can calculate
- Confidence interval M 1.96(PopulationSDM)
- These two calculations require knowing
PopulationSD so that we can calculate
PopulationSDM - What if we didnt know PopulationSDM and had to
estimate it from our sample? - What should we use to estimate PopulationSDM ?
- Would we be able to substitute this estimate
(estimated PopulationSDM) into our formulas and
have everything work out the same way?
4Sampling Distributions -- biased and unbiased
estimates
- We know that if you repeatedly choose samples of
size N and compute the mean (M) for each sample,
we will create a distribution of sample means. - The mean of the distribution of sample means
(PopulationMM) will equal that of the original
distribution (PopulationM). - In this sense the sample mean (M) is an unbiased
estimate of PopulationM because on average M
PopulationM.
5Sampling Distributions -- biased and unbiased
estimates
- If we repeatedly choose samples of size N and
compute the variance (SD2) for each sample, -
- we will create a distribution of variances.
- The mean of the distribution of variances will
not equal of the variances of original
distribution (PopulationSD2). - In this sense the sample variance (SD2) is a
biased estimate of PopulationSD2 because on
average SD2 ? PopulationSD2.
6Sampling Distributions -- biased and unbiased
estimates
- But, if we repeatedly choose samples of size N
and compute the the variance as - we will create a distribution of variances and
the mean of the distribution of variances
(computed with N-1) will equal of the variance of
original distribution (PopulationSD2). - We refer to N-1 as the number of degrees of
freedom (df) i.e., df N-1 - In this sense the sample variance computed with
N-1 in the denominator (S2) is an unbiased
estimate of PopulationSD2 because on average S2
PopulationSD2.
7Sampling Distributions -- biased and unbiased
estimates
- Therefore, going back to our first question,
- What should we use to estimate PopulationSDM ?
- The answer is we should first compute an unbiased
estimate of PopulationSD2 as - And then we should compute an estimate of
PopulationSDM as - or
- Explain the difference between S2 and SD2
- Explain the difference between S and SM
- Explain the difference between SM and
PopulationSDM
Web Demo
8The t-distribution
- What we know already
- The distribution of sample means has the
following parameters - PopulationMM PopulationM
- PopulationSDM PopulationSD/sqrt(N)
- Thus any particular M can can be converted to a Z
score in the following way - Producing the standard normal distribution or,
in other words, a sampling distribution of
Z-scores.
9The t-distribution
- Gosset raised the following question
- How would things change if we divided by SM
rather than PopulationSDM itself? - Would the resulting sampling distribution be
normal? - The answer is no in general t-scores are not
normally distributed. - But the distribution of t-scores is symmetric
- and has a mean of zero
- The exact form of the t-distribution depends on N
- For large N the t-distribution approaches the
standard normal distribution (the z-distribution)
but for small N the t- distribution becomes
leptokurtic.
10The t-distribution
The good news is that the t-distribution has a
definite form we know this because of smart
people like Gossett
You dont have to remember this!!!
11The t-distribution
12The t-distribution
We use the t-distribution in same way we use the
z-distribution we find t-critical in the same
way we find z-critical
t-critical (tcrit)
13(No Transcript)
14The one sample t-test
- Consider our baby/supercharged vitamin example
again - Lets say you know that on average the first
steps are taken at 14 months - but you dont know PopulationSD
15The one sample t-test
- Assume youve chosen a sample of 16 babies and
given them the vitamins - H0 Pop1M gt Pop2M
- H1 Pop1M lt Pop2M
- Set ? .05 and perform a one tailed t-test.
- The comparison distribution is the t-distribution
- with df (N - 1) 15, and tcrit -1.753
- Calculate t
16The one sample t-test
- The sample mean is M 8 and and standard
deviation S 12 - Calculate SM S / sqrt(N) 12/4 3
- Calculate t (M - PopulationM) / SM (8 - 14) /
3 -2 - t -2, which is less than tcrit -1.753
- Therefore, reject H0.
- Conclude that the vitamins had an effect.
17The one sample t-test
- Consider our rat on the running wheel again
- Lets say you know that on average rats spend 50
minutes out of 2 hrs on a running wheel but you
dont know PopulationSD
18The one sample t-test
- Assume youve chosen a sample of 25 rats and
injected them with an amphetamine then measured
the time they spend on the running wheel. - H0 Pop1M ??? Pop2M
- H1 Pop1M gt Pop2M
- Set ? .05 and perform a one tailed test.
- The comparison distribution is the t-distribution
with df 24, therefore tcrit 1.711 - Calculate t
19The t-test for dependent means
- The sample mean is M 60 and and standard
deviation S 16 - Calculate SM S / sqrt(N) 16/5 3.2
- Calculate t (M - PopulationM) / SM (60 - 50)
/ 3.2 3.125 - t 3.125 which is greater than tcrit 1.711
- Therefore, reject H0.
- Conclude that the amphetamine injections had an
effect.
20The t-test for dependent means
- Consider our rats on the running wheel again
- Repeated measures designs.
21The t-test for dependent means
- Assume youve chosen a sample of 10 rats and
measured their running time before and after an
amphetamine injection. - Before After Difference
- 12 13 1
- 14 14 0
- 15 16 1
- 13 13 0
- 12 13 1
- 11 13 2
- 14 14 0
- 13 13 0
- 0.625 mean Mdiff
- 0.744 S
- 0.263 SM S / sqrt(N)
- 2.38 t (t Mdiff / SM)
22The t-test for dependent means
- Our t score 2.38, which exceeds the cutoff
value of t (1.89) for a one tailed test. - Therefore we reject the null hypothesis.
23The t-test for dependent means
- Assumption the t-test is based on the assumption
that the population you sampled is normal - If this assumption does not hold then the
validity of the t-test may be questions - One way to assess this assumption is to see
whether the sample distribution appears to be
normal. - Estimating Effect Size
- Because we dont know the population SD we cant
compute effect size but we can estimate it from
the mean difference and the sample standard
deviation - i.e., M / S
24The t-test for dependent means
25The t-test for dependent means
- Power when Planning an Experiment
26Confidence intervals for means and mean
differences
- Recall that when we knew the PopulationSD and
sample size, we were able to compute a confidence
interval about a sample mean - i.e., M zcrit (PopulationSDM)
- When we have to estimate PopulationSD from S, we
can use SM and the t-distribution to calculate a
condidence interval about a sample mean - i.e., M tcrit (SM)
- The same procedure can be used to place a
confidence interval around a mean difference (or
a mean) when PopulationSD is unknown - i.e., MDiff tcrit (SM) where SM is the standard
error of the difference scores.