# How to | Test Hypotheses for Population Means

Many times in statistical analysis you may need to know if a population mean is significantly different from some reference value. This is a type of -test if the population variance is not known. The Wolfram Language contains several functions to test hypotheses for population means.

First, generate a sample dataset:

 In[1]:=
 Out[1]=

Perform a TTest. This will return the -value of the test with null hypothesis that the population mean is 9. By default, TTest returns the two-sided -value:

 In[2]:=
 Out[2]=

Get the one-sided -value for the same test under the alternative hypothesis that the mean is less than 9:

 In[3]:=
 Out[3]=

You can also use TTest to decide whether the difference between two population means differs significantly from an assumed value. In this case, the null hypothesis is that the population means are equal (differ by 0):

 In[4]:=
 Out[4]=

Test with a null hypothesis that the population mean of data is 4 greater than that of data2:

 In[5]:=
 Out[5]=

Tests can also be done for paired comparisons of datasets. This can be done by using PairedTTest on the pairwise differences:

 In[6]:=
 Out[6]=