366_7. t-distribution t-test vs. z-test z assumes we know, or can calculate the standard error of...

21
366_7

Upload: bennett-ward

Post on 18-Jan-2018

218 views

Category:

Documents


0 download

DESCRIPTION

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)

TRANSCRIPT

Page 1: 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

366_7

Page 2: 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

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

Page 3: 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

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)

Page 4: 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

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

Page 5: 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

T-ratio

• Suppose observing children 10 cooperating

• how many cooperative acts?

• how confident it reflects population

1523412243 1) mean = 2.7

Page 6: 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

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

Page 7: 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

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

Page 8: 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

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

Page 9: 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

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

Page 10: 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

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?

Page 11: 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

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

Page 12: 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

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?

Page 13: 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

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

Page 14: 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

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?

Page 15: 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

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

Page 16: 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

Mean of group 1 significantly different than mean of group 2?

Non south, x= .33; s.e. .03 South, x= .43; s.e .05

Page 17: 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

t-test

• Southern states, zoomed in....

Page 18: 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

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

.

Page 19: 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

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

Page 20: 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

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)

Page 21: 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

t test results

• Do we accept of reject null hypothesis?