366_7. t-distribution t-test vs. z-test z assumes we know, or can calculate the standard error of...
Post on 18-Jan-2018
218 Views
Preview:
DESCRIPTION
TRANSCRIPT
366_7
T-distribution
• T-test vs. Z-test
• Z assumes we know, or can calculate the standard error of the distribution of something in a population
• We never really do
T-distribution
• Reality: We estimate standard error of a mean we observe from (duh) what we observe
• Insert formula for estimate of standard dev. of sample here (p. 138) & std error of mean (p. 139)
T-ratio
• t-ratio used to test if/how an observation from a sample reflects the population mean
• very similar to Z-scores (at infinity)
• Slightly different distribution
T-ratio
• Suppose observing children 10 cooperating
• how many cooperative acts?
• how confident it reflects population
1523412243 1) mean = 2.7
T-ratio
• Suppose observing children 10 cooperating
2) Calculate std. deviationsum of sq distances from mean
sum X2=89
sd=SQRT (89/10) – 2.7
=1.27
T-ratio
• Suppose observing children 10 cooperating
3) Translate std dev. into std. errors.e= s.d / SQRT(N-1)
= .42
4) establish degrees of freedom & alpha (.05)
df = N-1= 9
5) Check Table C
T-ratio
• how confident?
• 95% confident the population mean is between 1.74 to 3.66 acts.
6) t= 2.26
7) Confidence intervals95%= 2.7 +/-
(2.62*.42)
= 2.7 +/- .96= 1.74 +/- 3.66
Hypothesis Testing with tResearch Hypothesis (H1):
Something is going on.
There is a difference between groups, Men have higher score.H1: Xm > Xf
Null Hypothesis (H0):
There is no difference Mean for group 1 = the mean for group 2
H0: X1 = X2
Hypothesis Testing with t
Observe difference between means:
Magnitude of difference Variance in measure of X1 and X2Number of observations
What is the likelihood that such a difference would occur by chance?
T-test
• Assume– Random samples, independent of each other– Variable being compared is interval or ratio– Distributions are normal– Roughly equal variance of each group
T-test
• Decide criteria, or critical t– Alpha to reject (chance of a Type 1 error)• t= 1.65 for alpha = .10 (at infinity. Critical t larger if
sample small)
• t= 1.96 for alpha - .05 (larger if sample small)
– Directional test?
t test
• Calculate t
t = (x1 – x2)________________s x1-x2 ----------std. error of the difference between 2 means
this part is messy, but includes info about sample sizes
t-test
• result is one value (t-statistic) we can use to check if difference between groups is significant
• Example:– Corruption, south vs. non south• What hypothesis?
Projects
• Identify testable hypotheses– x causes y– x explains differences in y– differences in x explain y– x and y go together in some interesting way
• Identify how to measure what you want to test– What actual questions
• We’ll worry about the test statistic later
Mean of group 1 significantly different than mean of group 2?
Non south, x= .33; s.e. .03 South, x= .43; s.e .05
t-test
• Southern states, zoomed in....
Results ttest percap_convic, by(var82)
Two-sample t test with equal variances------------------------------------------------------------------------------ Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]---------+-------------------------------------------------------------------- 0 | 39 .3358051 .0313071 .1955129 .2724272 .3991831 1 | 11 .4324917 .0577252 .1914528 .303872 .5611115---------+--------------------------------------------------------------------combined | 50 .3570762 .0278429 .1968793 .3011237 .4130287---------+-------------------------------------------------------------------- diff | -.0966866 .0664606 -.2303146 .0369414------------------------------------------------------------------------------ diff = mean(0) - mean(1) t = -1.4548Ho: diff = 0 degrees of freedom = 48
Ha: diff < 0 Ha: diff != 0 Ha: diff > 0 Pr(T < t) = 0.0761 Pr(|T| > |t|) = 0.1522 Pr(T > t) = 0.9239
.
Results
• Note each mean is given• variation around mean is given• confidence intervals• difference between means is given (-.096)• std. error of differences btwn means given
• AND t values
Results
• Note different t values are given
• Each is for a specific hypothesis– Difference is greater than 0, positive (one tail)– Difference is greater than 0, negative (one tail)
– “Absolute difference” (two tail)
t test results
• Do we accept of reject null hypothesis?
top related