who really know about statistics
How to do a t-test with Megastat
t-tests were developed by William Gossett to discover if there is a significant difference in the means of data. Although there are many types of t-tests you will compare two independent groups. The data samples must be under 30. No not have zero’s or words (nominal data, women, men, etc.) in your data sets.
See slides 102-107 in Power Point Presentation in the Instructor Announcements under Yellow Brick Road.
See the t-test sample paper and Megastats in the Student Materials.
First understand that you must have two different sets of the same type of data. You can compare apples and oranges as long as you measure their weight or total sales but you cannot compare weight and sales. They will certainly be different. Example below: Electric and gas monthly heating costs measuring U.S. dollars.
Electric | Gas |
265 | 260 |
271 | 270 |
260 | 250 |
250 | 255 |
248 | 250 |
280 | 275 |
257 | 260 |
262 | 260 |
Open Excel, log in both data sets. Go to Add Ins, Megastat, Hypothesis Tests, Compare Two Independent Groups, left mouse click highlight Group 1 then Group 2, OK.
This will appear in the output tab at the bottom of the spreadsheet:
Hypothesis Test: Independent Groups (t-test, pooled variance)
Electric | Gas | |||
261.57 | 260.00 | mean | ||
11.41 | 8.86 | std. dev. | ||
13 | df | |||
1.571 | difference (Electric - Gas) | |||
102.440 | pooled variance | |||
10.121 | pooled std. dev. | |||
5.238 | standard error of difference | |||
hypothesized difference | ||||
0.300 | t | |||
.7689 | p-value (two-tailed) |
Retain the null hypothesis, the p-value of p=.76 is larger than the alpha level of significance of .05. There is no significant difference between electric and gas as measured by monthly heating costs.
Copy and paste to your paper.
Use p-value in the Student Materials and slides 66-69 in Power Point Presentation in the Instructor Announcements under Yellow Brick Road to help you reject or retain the null hypothesis to determine if the data sets are significantly different or the same.
I hope this helps,
Dr. Loro