Last night we discussed the history and background of the one sample t-test. As promised, tonight we will discuss how it is you actually use the slick little hypothesis test. At the end of this post is a free case study available for download.
When to use it
We may choose to use the one sample t-test when we want to compare a sample mean to a target value and we don’t know the true population standard deviation (s). Also, as we discussed last night, the one sample t-test allows us to work with smaller sample sizes.
There are a few assumptions we need to consider prior to running with the one sample t-test.
- Our data should be stable and not trending. If, for example, our data has been trending up for the last 3 months the one sample t-test should not be employed. How to check this? Throw the data into a control chart and see what it tells you.
- The data should be normally distributed. There are fancy statistical tests such as the Anderson-Darling test that can help us here. I always recommend people first study the “shape” of the data in a simple histogram. If the shape looks normal to the eye I say press on with the one sample t-test.
State the null and alternate hypothesis
If we satisfy the assumptions it is now time to state the null (Ho) and alternate (Ha) hypothesis. For the standard one sample t-test it will looking something like this, assuming our “target” value is 25 for the sake of this example.
- Ho: mu = 25
- Ha: mu not = 25
Determine the level of risk you are willing to take
With hypothesis testing we never accept anything. Instead we either reject or fail to reject a hypothesis just like the American judicial system where we never prove someone innocent. Instead, they are either guilty or not guilty beyond a reasonable doubt. Just ask O.J. Simpson, he knows all about this aspect of hypothesis testing!
So with hypothesis testing we need to state the level of risk, or reasonable doubt, we are willing to take. In most cases an “aplha risk,” as it is called, of 5% is commonly chosen.
Run the test and make a decision
Now then, we have met our assumptions and stated the level of risk we are willing to take. Now all that’s left is to run the test and make a, gulp, decision.
When we run the test we will get a P value which is the is the probability of incorrectly rejecting the null hypothesis. Just remember this saying, “if P is low, Ho must go.”
So, we run the test and examine the P value. If the P value is less than 5% we reject Ho and state that the alternate hypothesis is true at the confidence level of 100*(1-P value)%. If it is greater than 5% we fail to reject the null hypothesis.
We will also get information on confidence intervals which basically tells us a range of where we may expect to see our data.
Below is a fictitious case study demonstrating how this one sample t-test may be applied. Since the document is free all I ask in return is for you to share it with as many people as possible. That way, together we can get everyone hooked on hypothesis testing!
Click here to access the free case study. Once the document opens in the window you can choose to save it. You can also “right-click” the file and choose “Save Target As” if you wish. Happy reading!
Photo Credit: 1