t-test
Now that we have covered the z-test, we are going to briefly go over a another test which basically does the same thing.
However, there are some important similarities and differences between a z-test and a t-test.
A. Similarity to z-test.
1. Both tests are based upon the same logic
Distribution of differences are used to determine how likely it is that two samples came from the same population.
That is, why we spent so much time going over the z-test. It is very similar to t-test.
B. Differences
1. t-test works with small sample sizes
The z-test is not a good test to use when the samples contain very few people.
Since most samples are relatively small, you will see t-tests used most of the time.
2. Distribution of differences is estimated differently between a z-test and a t-test.
While both are based on the same logic, that we can compare the difference we obtained between two groups with all possible differences to determine how likely these differences were, the way the distribution of differences is estimated is very different.
3. The critical values used to determine whether or not the null hypothesis should be accepted or rejected vary according to sample size.
With the z-test, the critical values remained the same regardless of the size of the sample. With a t-test, the size of the sample influences how large the critical values must be. That is, a different distribution of differences is calculated for different sample sizes.
C. Steps involved in using t-tests
1. Calculate a t-score
Very similar to z-scores.
t = (X1 - X2)/ s diff
2. Calculate df (degrees of freedom).
When doing t-tests, the distribution of differences used is determined by the size of our samples.
So, df give us an idea of the number of people in our samples. They allow us to use the correct distribution of differences when determining if groups are different.
df = (N1- 1) + (N2 - 1) or (N1 + N2) - 2
3. Determine if you are doing a directional or non-directional test.
4. If doing a non-directional test go to the t-table and find the appropriate critical values for the p < .05 and p < .01 significance levels.
Use the df to select the appropriate cut off values. Simply doing the same thing you were doing with a z-test, but now the critical values change depending on the size of your sample (which is reflected in the degrees of freedom.).
Basically, rather than drawing hundreds of different distributions, they simply list the critical values for many of the different distributions in a table, where you can look at up the critical value given your sample size.
Take the absolute value of the t-score calculated and if this value is greater than the critical values at p <.05 or p < .01 then reject the null hypothesis.
5. If doing a directional test, then make sure that your t-score is in the predicted direction first.
So, if comparing if X1 > X2, your t-score must be positive or else you must accept the null hypothesis.
If comparing if X1 < X2, your t-score must be negative or else you must accept the null hypothesis.
If t-score is in the predicted direction then take the absolute value of the t-score and compare this value with the appropriate critical values for the p < .05 and p < .01 significance levels.
If the t-score is greater than the critical values for p <.05 or p < .01 then reject the null hypothesis.
Example:
A political consultant hypothesizes that using negative ads to attack an opponent is more effective at getting votes than using positive ads in favor of a candidate.
So, 30 people are randomly assigned to watch either an ad that attacks a candidates opponent or shows the candidate in a positive light.
15 people watch the ad attacking the candidates opponent
15 people watch the ad showing the candidate in a positive light
After viewing the ads, people are asked who they would vote for.
People watching negative ads attacking the candidates opponent say they are very likely to vote for the candidate (Xattack ad = 7.5)
People watching positive ads supporting a candidate say that they are likely to vote for the candidate (Xpositive ad = 5.5)
You notice that the groups are different from each other, but are these differences due to chance or the ads they watched?
Conduct a t-test to find out.
1. Calculate a t-score for the difference between the two groups
t = (Xattack ad - Xpositive ad) / s diff
(Side Note: I will always provide the s diff)
t = (7.5 - 5.5)/0.5
t = 2/.05
t = 4
2. Calculate the df.
df = (N1- 1) + (N2 - 1)
df = (15 - 1) + (15 - 1)
df = 14 + 14
df = 28
3. Determine if doing a non-directional or directional test
Research Hypothesis is: Xattack ad > Xpositive ad (based on what I EXPECT to happen)
Null Hypothesis is: Xattack ad £ Xpositive ad
So, we are conducting a directional test.
4. Since we are testing whether the first group is larger than the second group, our t-value must be positive or else we have to accept the null hypothesis (groups are not different).
Since t-score is in the predicted direction (positive), take the absolute value of t-score and compare it with appropriate critical values in t-table
t-score = +4
Critical value for 1-tailed directional test with 28 df is:
1.701 at p < .05
2.467 at p < .01
If t-score is larger than critical value at p < .05 or p < .01 then reject the null hypothesis.
So, we reject the null hypothesis and say that negative political attack ads are more effective than using positive political ads.