Introduction
The simplest type of hypothesis test is the Single Sample Z test. This test compares a sample mean against a distribution of population means to determine if it is likely that the sample mean came from the population mean. This hypothesis test is not very common because it is rare to have population standard deviation information. Although uncommon, the single sample z test is easy to calculate and serves a good foundation for other hypothesis tests (such as t tests) which are very common.
 
The easiest way to understand single sample z tests is to work through an example. Let's imagine that we want to determine if the students at our school have different IQs than the general population. Our sample is 100 students, and the average IQ is 103, which is 3 points higher than the population mean of 100 (with a standard deviation of 10). How can we test the hypothesis that the students are smarter than the general population?
 
Here's a display of the distributions for the hypothesis test for the previous problem.

Display of  Single Sample Z hypothesis test

As the display shows, the sample mean is well into the red rejection region which defines which sample means are unlikely to occur given the null hypothesis. Of course,  we define 'unlikely' as the size of the rejection region, which is .05 in this case.
 
Here's another problem with the solution worked out. The mean IQ from a sample of 36 students is 102. Consider the hypothesis test that compares this sample mean of 102 to the population mean of 100. Assume that the scores are normally distributed, σX=12,α=.05,tails=2.
What are the results of the hypothesis test?
Answer:Observed Z value of 1.00 is within area of critical value of -1.96 to 1.96
FAIL TO REJECT NULL HYPOTHESIS
Step 1:Choose statistical test. What type of variable is it? How many groups are there? Are the groups related?
Variable type is ratio. Comparing a sample mean against population mean. Use single sample Z test
Step 2:Calculate Standard Error. σX=σX/N
σX=σX/36=2
Step 3:Calculate Z value of sample mean. Z=(X-μ)/σX
Z=(X-μ)/σX=(102-100)/2=1.00
Step 4:Lookup critical value. Use Z table
For 2 tails and α=.05 critical value is 1.96
Step 5:Test Hypothesis. Is observed Z value in rejection region?
Observed Z value of 1.00 is within area of critical value of -1.96 to 1.96
FAIL TO REJECT NULL HYPOTHESIS

Display of mean distribution for single sample z hypothesis test #2

Here we can see that the null hypothesis is not rejected because the sample mean does not fall in the rejection region. Therefore, the experiment concludes that the observed difference between the sample mean and the population mean is not great enough to reject the idea that the sample mean came from the population.
 
It is possible to have single sample t tests as well, but these are very atypical because such a test would require the population mean to be known without knowing the population standard deviation. Therefore, single sample t tests are not covered on this website.
 
Definitions
Single Sample Z test: Hypothesis Test that compares a sample mean against a population mean. Population mean and standard deviation must be known.
 
Easy Questions
1. A single sample Z-test is used to test if a sample mean is likely to have come from a population. In order to perform such a hypothesis test, we need to know the population  _____________________ and _____________________ .
2. Why are single sample Z-tests not used very often?
3. I am testing to see if my sample mean of 200 is different from a
population with a known mean of 190 and a known standard deviation of
20. What kind of statistical test should I use?
4. Why are single sample t tests almost never done?
Medium Questions
5. The mean IQ from a sample of 196 students is 101.5. Consider the hypothesis test that compares this sample mean of 101.8 to the population mean of 100. Previous evidence suggests that the students in the sample are smarter than the general population. Assume that the scores are normally distributed, σX=14,α=.05. What are the results of the hypothesis test?
6. The mean IQ from a sample of 196 students is 101.5. Consider the hypothesis test that compares this sample mean of 101.5 to the population mean of 100. Assume that the scores are normally distributed, σX=14,α=.05,tails=2. What are the results of the hypothesis test?