Download How to perform a t-test

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
no text concepts found
Transcript
HOW TO DO A T-TEST
1. First, find the grand mean (X) for each treatment:
X = (xi)/ni
xi is the mean of each replicate and ni is the number of replicates in that treatment.
If you only have one observation for each replicate, then this one number is
considered to be xi. You should have one grand mean (X) for each of your
treatments.
2. Now find the variance (s2) for each treatment:
s2 = (xi 2)- [(xi) 2/ni]
______________
(ni -1)
xi is the mean of each replicate and ni is the number of replicates in that treatment.
You should have a different variance for each treatment. For example, if you have
three treatments then you should calculate three separate variances, one for each
treatment.
2. The standard error (SE) can be calculated for each treatment. First take the square root of the
variance (s2) of each treatment to find the standard deviation (s). Then divide the standard
deviation by the square root of the number of replicates you have for each treatment. You should
have a standard error for each of your treatments. The standard error can be used for your graphs
(plot the mean for each treatment  SE). You do not need to use the standard error for your ttest, but you will be required to report it in a table in your final report. The formula for the
standard error is below:
SE = s/ ni
4. Now you must perform a t-test for each pairwise comparison. For example, if you are
comparing three treatments, you will have to perform three pairwise comparisons and therefore
three separate t-tests (Treatment 1 vs. Treatment 2, Treatment 2 vs. Treatment 3, and Treatment
1 vs. Treatment 3) If you are comparing four treatments, you will have to perform six pairwise
comparisons and therefore six separate t-tests (Trt 1 vs. Trt 2, Trt 2 vs. Trt 3, Trt 3 vs. Trt 4, Trt 1
vs. Trt 3, Trt 1 vs. Trt 4, Trt 2 vs. Trt 4).
Pick the first pair of comparisons and find Sp ,the pooled standard deviation for that
particular pair. You will have a separate pooled standard deviation for each
pair of
comparisons.
Sp = (n1 -1) s12 + (n2 -1) s22
__________________
(n1 + n2 -2)
n1 and n2 are the number of replicates for the first and second treatment in your
pairwise comparison. s12 and s22 are the variances of the mean for the first and
treatment in each pair (calculated in #2 above).
second
Next take the numbers found in the above steps and plug into the formula for a t-test.
t=
X1 - X2
_____________
Sp 1/n1 + 1/n2
X1 and X2 are the treatment grand means (calculated in #1 above) for each treatment in
our pairwise comparison. Make sure that X1 is greater than X2 to avoid getting negative
numbers.
5. You should have a separate t-test and therefore a separate t-value for each of your pairwise
comparisons. Now you must compare your calculated t-value to a table value. The degrees of
freedom (df) for each test is defined as n1 + n2 - 2. If all of your number of replicates are the
same, then the degrees of freedom for each t-test are the same. If your number of replicates for
each treatment is different, you will have a different degree of freedom for each t-test. The
overall  value for your tests will be 0.10. Now go to the t-table. Go down the first column to
find appropriate number of degrees of freedom (df). If the exact value for your df is not in the
table, use the closest number to your actual df that is not greater than your actual df. For
example, if you have 50 df, you would use the table value corresponding to 40 df, not 60 df.
Next go across the table until 1 minus /2 (0.95) is on the top column. This value is the table tvalue that you will compare your calculated t-value to. If your calculated t-value is greater than
the table value, you reject your null hypothesis and conclude that there is a difference between
the two treatments. If your calculated t-value is less than the table t-value, you accept your null
hypothesis and conclude that there is no difference between treatments.
PRESENTATION OF DATA AND DATA ANALYSIS RESULTS:
Include a table (or figure) containing the following: means for each treatment, standard
error for each treatment, number of replicates for each treatment and a summary of each t-test
performed.
Treatment
Mean
SE
Number of Replicates
pH 3.0
5.2
1.0
3
pH 6.0
7.5
0.9
3
pH 9.0
6.2
3.5
2
For the summary of the t-test, first identify the pairwise comparison, then report the df,
calculated t-statistic, and p-value. The table below is an example of how you might present the
above data.
Summary of t-tests
pH 3.0 vs. pH 6.0
pH 6.0 vs. pH 9.0
pH 3.0 vs. pH 9.0
adjusted  = .0167
df
4
3
4
t-statistic
1.8
2.7
7.5
p-value
0.13
0.06
0.001
* or NS
NS
NS
*
In order to graphically display your data, plot the means  SE of each treatment and
indicate which differed from one another when you performed your t-tests. Use letters to
designate which treatments differed when you used the t-tests. In the graph, the treatments
labeled with the same letters are not different from one another. In the sample data above, the
pH 3.0 treatment differed from the pH 9.0 treatment, so one bar on the graph can be labeled as
“a” and the other can be labeled as “b,” thus indicating the difference. The pH 6.0 treatment was
not different from either the pH 3.0 or pH 9.0 treatment and can be labeled with “ab.” This
notation indicates that the pH 6.0 treatment (ab) was not different from the pH 9.0 treatment (a)
or the pH 3.0 treatment (b) since it is labeled with letters in common with both treatments.
DO NOT INCLUDE RAW DATA!! Don’t forget to include descriptive titles for all tables and
graphs.