Statitstical Inference
4.8 specifying null hypotheses in spss.
![null hypothesis spss Flow chart for selecting a test in SPSS.](https://shklinkenberg.github.io/GentleIntro_files/figure-html/flowchart-1.png)
Figure 4.9: Flow chart for selecting a test in SPSS.
Statistics such as means, proportions, variances, and correlations are calculated on variables. For translating a research hypothesis into a statistical hypothesis, the researcher has to recognize the dependent and independent variables addressed by the research hypothesis and their variable types. The main distinction is between dichotomies (two groups), (other) categorical variables (three or more groups), and numerical variables. Once you have identified the variables, the flow chart in Figure 4.9 helps you to identify the right statistical test.
If possible, SPSS uses a theoretical probability distribution to approximate the sampling distribution. It will select the appropriate sampling distribution. In some cases, such as a test on a contingency table with two rows and two columns, SPSS automatically includes an exact test because the theoretical approximation cannot be relied on.
SPSS does not allow the user to specify the null hypothesis of a test if the test involves two or more variables. If you cannot specify the null hypothesis, SPSS uses the nil hypothesis that the population value of interest is zero. For example, SPSS tests the null hypothesis that males and females have the same average willingness to donate to a charity, that is, the mean difference is zero, if we apply an independent samples t test.
Imagine that we know from previous research that females tend to score one point higher on the willingness scale than males. It would not be very interesting to reject the nil hypothesis. Instead, we would like to test the null hypothesis that the average difference between females and males is 1.00. We cannot change the null hypothesis of a t test in SPSS, but we can use the confidence interval to test this null hypothesis as explained in Section 4.6.1 .
In SPSS, the analyst has to specify the null hypothesis in tests on one variable, namely tests on one proportion, one mean, or one categorical variable. The following instructions explain how to do this.
![](http://ustaliy.fun/777/templates/cheerup/res/banner1.gif)
4.8.1 Specify null for binomial test
A proportion is the statistic best suited to test research hypotheses addressing the share of a category in the population. The hypothesis that a television station reaches half of all households in a country provides an example. All households in the country constitute the population. The share of the television station is the proportion or percentage of all households watching this television station.
If we have a data set for a sample of households containing a variable indicating whether or not a household watches the television station, we can test the research hypothesis with a binomial test. The statistical null hypothesis is that the proportion of households watching the television station is 0.5 in the population.
Figure 4.10: A binomial test on a single proportion in SPSS.
We can also be interested in more than one category, for instance, in which regions are the households located: in the north, east, south, and west of the country? This translates into a statistical hypothesis containing two or more proportions in the population. If 30% of households in the population are situated in the west, 25 % in the south and east, and 20% in the north, we would expect these proportions in the sample if all regions are equally well-represented. Our statistical hypothesis is actually a relative frequency distribution, such as, for instance, in Table 4.1 .
Region | Hypothesized Proportion |
---|---|
North | 0.20 |
East | 0.25 |
South | 0.25 |
West | 0.30 |
A test for this type of statistical hypothesis is called a one-sample chi-squared test. It is up to the researcher to specify the hypothesized proportions for all categories. This is not a simple task: What reasons do we have to expect particular values, say a region’s share of thirty per cent of all households instead of twenty-five per cent?
The test is mainly used if researchers know the true proportions of the categories in the population from which they aimed to draw their sample. If we try to draw a sample from all citizens of a country, we usually know the frequency distribution of sex, age, educational level, and so on for all citizens from the national bureau of statistics. With the bureau’s information, we can test if the respondents in our sample have the same distribution with respect to sex, age, or educational level as the population from which we tried to draw the sample; just use the official population proportions in the null hypothesis.
If the proportions in the sample do not differ more from the known proportions in the population than we expect based on chance, the sample is representative of the population in the statistical sense (see Section 1.2.6 ). As always, we use the p value of the test as the probability of obtaining our sample or a sample that is even more different from the null hypothesis, if the null hypothesis is true. Note that the null hypothesis now represents the (distribution in) the population from which we tried to draw our sample. We conclude that the sample is representative of this population in the statistical sense if we can not reject the null hypothesis, that is, if the p value is larger than .05. Not rejecting the null hypothesis means that we have sufficient probability that our sample was drawn from the population that we wanted to investigate. We can now be more confident that our sample results generalize to the population that we meant to investigate.
Figure 4.11: A chi-squared test on a frequency distribution in SPSS.
Finally, we have the significance test on one mean, which we have used in the example of average media literacy throughout this chapter. For a numeric (interval or ratio measurement level) variable such as the 10-point scale in this example, the mean is a good measure of the distribution’s center. Our statistical hypothesis would be that average media literacy score of all children in the population is (below) 5.5.
Figure 4.12: A one-sample t test in SPSS.
- Skip to primary navigation
- Skip to main content
- Skip to primary sidebar
Statistical Methods and Data Analytics
SPSS Annotated Output T-test
The t-test procedure performs t-tests for one sample, two samples and paired observations. The single-sample t-test compares the mean of the sample to a given number (which you supply). The independent samples t-test compares the difference in the means from the two groups to a given value (usually 0). In other words, it tests whether the difference in the means is 0. The dependent-sample or paired t-test compares the difference in the means from the two variables measured on the same set of subjects to a given number (usually 0), while taking into account the fact that the scores are not independent. In our examples, we will use the hsb2 data set.
Single sample t-test
The single sample t-test tests the null hypothesis that the population mean is equal to the number specified by the user. SPSS calculates the t-statistic and its p-value under the assumption that the sample comes from an approximately normal distribution. If the p-value associated with the t-test is small (0.05 is often used as the threshold), there is evidence that the mean is different from the hypothesized value. If the p-value associated with the t-test is not small (p > 0.05), then the null hypothesis is not rejected and you can conclude that the mean is not different from the hypothesized value.
In this example, the t-statistic is 4.140 with 199 degrees of freedom. The corresponding two-tailed p-value is .000, which is less than 0.05. We conclude that the mean of variable write is different from 50.
![null hypothesis spss Image spss_ttest_1](https://stats.idre.ucla.edu/wp-content/uploads/2016/02/spss_ttest_1.jpg)
One-Sample Statistics
![null hypothesis spss Image spss_ttest_2](https://stats.idre.ucla.edu/wp-content/uploads/2016/02/spss_ttest_2.jpg)
a. – This is the list of variables. Each variable that was listed on the variables= statement in the above code will have its own line in this part of the output.
b. N – This is the number of valid (i.e., non-missing) observations used in calculating the t-test.
c. Mean – This is the mean of the variable.
d. Std. Deviation – This is the standard deviation of the variable.
e. Std. Error Mean – This is the estimated standard deviation of the sample mean. If we drew repeated samples of size 200, we would expect the standard deviation of the sample means to be close to the standard error. The standard deviation of the distribution of sample mean is estimated as the standard deviation of the sample divided by the square root of sample size: 9.47859/(sqrt(200)) = .67024.
Test statistics
![null hypothesis spss Image spss_ttest_3](https://stats.idre.ucla.edu/wp-content/uploads/2016/02/spss_ttest_3.jpg)
f. – This identifies the variables. Each variable that was listed on the variables= statement will have its own line in this part of the output. If a variables= statement is not specified, t-test will conduct a t-test on all numerical variables in the dataset.
g. t – This is the Student t-statistic. It is the ratio of the difference between the sample mean and the given number to the standard error of the mean: (52.775 – 50) / .6702372 = 4.1403. Since the standard error of the mean measures the variability of the sample mean, the smaller the standard error of the mean, the more likely that our sample mean is close to the true population mean. This is illustrated by the following three figures.
In all three cases, the difference between the population means is the same. But with large variability of sample means, second graph, two populations overlap a great deal. Therefore, the difference may well come by chance. On the other hand, with small variability, the difference is more clear as in the third graph. The smaller the standard error of the mean, the larger the magnitude of the t-value and therefore, the smaller the p-value.
h. df – The degrees of freedom for the single sample t-test is simply the number of valid observations minus 1. We lose one degree of freedom because we have estimated the mean from the sample. We have used some of the information from the data to estimate the mean, therefore it is not available to use for the test and the degrees of freedom accounts for this.
i. Sig (2-tailed) – This is the two-tailed p-value evaluating the null against an alternative that the mean is not equal to 50. It is equal to the probability of observing a greater absolute value of t under the null hypothesis. If the p-value is less than the pre-specified alpha level (usually .05 or .01) we will conclude that mean is statistically significantly different from zero. For example, the p-value is smaller than 0.05. So we conclude that the mean for write is different from 50.
j. Mean Difference – This is the difference between the sample mean and the test value.
k. 95% Confidence Interval of the Difference – These are the lower and upper bound of the confidence interval for the mean. A confidence interval for the mean specifies a range of values within which the unknown population parameter, in this case the mean, may lie. It is given by
where s is the sample deviation of the observations and N is the number of valid observations. The t-value in the formula can be computed or found in any statistics book with the degrees of freedom being N-1 and the p-value being 1- alpha /2, where alpha is the confidence level and by default is .95.
Paired t-test
A paired (or “dependent”) t-test is used when the observations are not independent of one another. In the example below, the same students took both the writing and the reading test. Hence, you would expect there to be a relationship between the scores provided by each student. The paired t-test accounts for this. For each student, we are essentially looking at the differences in the values of the two variables and testing if the mean of these differences is equal to zero.
In this example, the t-statistic is 0.8673 with 199 degrees of freedom. The corresponding two-tailed p-value is 0.3868, which is greater than 0.05. We conclude that the mean difference of write and read is not different from 0.
![null hypothesis spss Image spss_ttest_4](https://stats.idre.ucla.edu/wp-content/uploads/2016/02/spss_ttest_4.jpg)
Summary statistics
![null hypothesis spss Image spss_ttest_5](https://stats.idre.ucla.edu/wp-content/uploads/2016/02/spss_ttest_5.jpg)
a. – This is the list of variables.
b. Mean – These are the respective means of the variables.
c. N – This is the number of valid (i.e., non-missing) observations used in calculating the t-test.
d. Std. Deviation – This is the standard deviations of the variables.
e. Std Error Mean – Standard Error Mean is the estimated standard deviation of the sample mean. This value is estimated as the standard deviation of one sample divided by the square root of sample size: 9.47859/sqrt(200) = .67024, 10.25294/sqrt(200) = .72499. This provides a measure of the variability of the sample mean.
f. Correlation – This is the correlation coefficient of the pair of variables indicated. This is a measure of the strength and direction of the linear relationship between the two variables. The correlation coefficient can range from -1 to +1, with -1 indicating a perfect negative correlation, +1 indicating a perfect positive correlation, and 0 indicating no correlation at all. (A variable correlated with itself will always have a correlation coefficient of 1.) You can think of the correlation coefficient as telling you the extent to which you can guess the value of one variable given a value of the other variable. The .597 is the numerical description of how tightly around the imaginary line the points lie. If the correlation was higher, the points would tend to be closer to the line; if it was smaller, they would tend to be further away from the line.
g. Sig – This is the p-value associated with the correlation. Here, correlation is significant at the .05 level.
![null hypothesis spss Image spss_ttest_7](https://stats.idre.ucla.edu/wp-content/uploads/2016/02/spss_ttest_7.jpg)
g. writing score-reading score – This is the value measured within each subject: the difference between the writing and reading scores. The paired t-test forms a single random sample of the paired difference. The mean of these values among all subjects is compared to 0 in a paired t-test.
h. Mean – This is the mean within-subject difference between the two variables.
i. Std. Deviation – This is the standard deviation of the mean paired difference.
j. Std Error Mean – This is the estimated standard deviation of the sample mean. This value is estimated as the standard deviation of one sample divided by the square root of sample size: 8.88667/sqrt(200) = .62838. This provides a measure of the variability of the sample mean.
k. 95% Confidence Interval of the Difference – These are the lower and upper bound of the confidence interval for the mean difference. A confidence interval for the mean specifies a range of values within which the unknown population parameter, in this case the mean, may lie. It is given by
l. t – This is the t-statistic. It is the ratio of the mean of the difference to the standard error of the difference: (.545/.62838).
m. degrees of freedom – The degrees of freedom for the paired observations is simply the number of observations minus 1. This is because the test is conducted on the one sample of the paired differences.
n. Sig. (2-tailed) – This is the two-tailed p-value computed using the t distribution. It is the probability of observing a greater absolute value of t under the null hypothesis. If the p-value is less than the pre-specified alpha level (usually .05 or .01, here the former) we will conclude that mean difference between writing score and reading score is statistically significantly different from zero. For example, the p-value for the difference between the two variables is greater than 0.05 so we conclude that the mean difference is not statistically significantly different from 0.
Independent group t-test
This t-test is designed to compare means of same variable between two groups. In our example, we compare the mean writing score between the group of female students and the group of male students. Ideally, these subjects are randomly selected from a larger population of subjects. The test assumes that variances for the two populations are the same. The interpretation for p-value is the same as in other type of t-tests.
In this example, the t-statistic is -3.7341 with 198 degrees of freedom. The corresponding two-tailed p-value is 0.0002, which is less than 0.05. We conclude that the difference of means in write between males and females is different from 0.
![null hypothesis spss Image spss_ttest_8](https://stats.idre.ucla.edu/wp-content/uploads/2016/02/spss_ttest_8.jpg)
a. female – This column gives categories of the independent variable female . This variable is necessary for doing the independent group t-test and is specified by the t-test groups= statement.
b. N – This is the number of valid (i.e., non-missing) observations in each group.
c. Mean – This is the mean of the dependent variable for each level of the independent variable.
d. Std. Deviation – This is the standard deviation of the dependent variable for each of the levels of the independent variable.
e. Std. Error Mean – This is the standard error of the mean, the ratio of the standard deviation to the square root of the respective number of observations.
![null hypothesis spss Image spss_ttest_10](https://stats.idre.ucla.edu/wp-content/uploads/2016/02/spss_ttest_10.jpg)
f. – This column lists the dependent variable(s). In our example, the dependent variable is write (labeled “writing score”).
g. – This column specifies the method for computing the standard error of the difference of the means. The method of computing this value is based on the assumption regarding the variances of the two groups. If we assume that the two populations have the same variance, then the first method, called pooled variance estimator, is used. Otherwise, when the variances are not assumed to be equal, the Satterthwaite’s method is used.
h. F – This column lists Levene’s test statistic. Assume \(k\) is the number of groups, \(N\) is the total number of observations, and \(N_i\) is the number of observations in each \(i\)-th group for dependent variable \(Y_{ij}\). Then Levene’s test statistic is defined as
\begin{equation} W = \frac{(N-k)}{(k-1)} \frac{\sum_{i=1}^{k} N_i (\bar{Z}_{i.}-\bar{Z}_{..})^2}{\sum_{i=1}^{k}\sum_{j=1}^{N_i}(Z_{ij}-\bar{Z}_{i.})^2} \end{equation}
\begin{equation} Z_{ij} = |Y_{ij}-\bar{Y}_{i.}| \end{equation}
where \(\bar{Y}_{i.}\) is the mean of the dependent variable and \(\bar{Z}_{i.}\) is the mean of \(Z_{ij}\) for each \(i\)-th group respectively, and \(\bar{Z}_{..}\) is the grand mean of \(Z_{ij}\).
i. Sig. – This is the two-tailed p-value associated with the null that the two groups have the same variance. In our example, the probability is less than 0.05. So there is evidence that the variances for the two groups, female students and male students, are different. Therefore, we may want to use the second method (Satterthwaite variance estimator) for our t-test.
j. t – These are the t-statistics under the two different assumptions: equal variances and unequal variances. These are the ratios of the mean of the differences to the standard errors of the difference under the two different assumptions: (-4.86995 / 1.30419) = -3.734, (-4.86995/1.33189) = -3.656.
k. df – The degrees of freedom when we assume equal variances is simply the sum of the two sample sizes (109 and 91) minus 2. The degrees of freedom when we assume unequal variances is calculated using the Satterthwaite formula.
l. Sig. (2-tailed) – The p-value is the two-tailed probability computed using the t distribution. It is the probability of observing a t-value of equal or greater absolute value under the null hypothesis. For a one-tailed test, halve this probability. If the p-value is less than our pre-specified alpha level, usually 0.05, we will conclude that the difference is significantly different from zero. For example, the p-value for the difference between females and males is less than 0.05 in both cases, so we conclude that the difference in means is statistically significantly different from 0.
m. Mean Difference – This is the difference between the means.
n. Std Error Difference – Standard Error difference is the estimated standard deviation of the difference between the sample means. If we drew repeated samples of size 200, we would expect the standard deviation of the sample means to be close to the standard error. This provides a measure of the variability of the sample mean. The Central Limit Theorem tells us that the sample means are approximately normally distributed when the sample size is 30 or greater. Note that the standard error difference is calculated differently under the two different assumptions.
o. 95% Confidence Interval of the Difference – These are the lower and upper bound of the confidence interval for the mean difference. A confidence interval for the mean specifies a range of values within which the unknown population parameter, in this case the mean, may lie. It is given by
where s is the sample deviation of the observations and N is the number of valid observations. The t-value in the formula can be computed or found in any statistics book with the degrees of freedom being N-1 and the p-value being 1- width /2, where width is the confidence level and by default is .95.
Your Name (required)
Your Email (must be a valid email for us to receive the report!)
Comment/Error Report (required)
How to cite this page
- © 2024 UC REGENTS
University Library
SPSS Tutorial: General Statistics and Hypothesis Testing
- About This Tutorial
- SPSS Components
- Importing Data
- General Statistics and Hypothesis Testing
- Further Resources
Merging Files based on a shared variable.
This section and the "Graphics" section provide a quick tutorial for a few common functions in SPSS, primarily to provide the reader with a feel for the SPSS user interface. This is not a comprehensive tutorial, but SPSS itself provides comprehensive tutorials and case studies through it's help menu. SPSS's help menu is more than a quick reference. It provides detailed information on how and when to use SPSS's various menu options. See the "Further Resources" section for more information.
To perform a one sample t-test click "Analyze"→"Compare Means"→"One Sample T-Test" and the following dialog box will appear:
The dialogue allows selection of any scale variable from the box at the left and a test value that represents a hypothetical mean. Select the test variable and set the test value, then press "Ok." Three tables will appear in the Output Viewer:
The first table gives descriptive statistics about the variable. The second shows the results of the t_test, including the "t" statistic, the degrees of freedom ("df") the p-value ("Sig."), the difference of the test value from the variable mean, and the upper and lower bounds for a ninety-five percent confidence interval. The final table shows one-sample effect sizes.
One-Way ANOVA
In the Data Editor, select "Analyze"→"Compare Means"→"One-Way ANOVA..." to open the dialog box shown below.
To generate the ANOVA statistic the variables chosen cannot have a "Nominal" level of measurement; they must be "ordinal."
Once the nominal variables have been changed to ordinal, select "the dependent variable and the factor, then click "OK." The following output will appear in the Output Viewer:
Linear Regression
To obtain a linear regression select "Analyze"->"Regression"->"Linear" from the menu, calling up the dialog box shown below:
The output of this most basic case produces a summary chart showing R, R-square, and the Standard error of the prediction; an ANOVA chart; and a chart providing statistics on model coefficients:
For Multiple regression, simply add more independent variables in the "Linear Regression" dialogue box. To plot a regression line see the "Legacy Dialogues" section of the "Graphics" tab.
Scholarly Commons
![null hypothesis spss Profile Photo](https://d2jv02qf7xgjwx.cloudfront.net/accounts/57156/profiles/52372/SSHELicon.jpg)
- << Previous: Importing Data
- Next: Graphics >>
- Last Updated: Jul 9, 2024 5:55 PM
- URL: https://guides.library.illinois.edu/spss
- Skip to secondary menu
- Skip to main content
- Skip to primary sidebar
Statistics By Jim
Making statistics intuitive
Null Hypothesis: Definition, Rejecting & Examples
By Jim Frost 6 Comments
What is a Null Hypothesis?
The null hypothesis in statistics states that there is no difference between groups or no relationship between variables. It is one of two mutually exclusive hypotheses about a population in a hypothesis test.
![null hypothesis spss Photograph of Rodin's statue, The Thinker who is pondering the null hypothesis.](https://i0.wp.com/statisticsbyjim.com/wp-content/uploads/2022/02/thinker.jpg?resize=300%2C199&ssl=1)
- Null Hypothesis H 0 : No effect exists in the population.
- Alternative Hypothesis H A : The effect exists in the population.
In every study or experiment, researchers assess an effect or relationship. This effect can be the effectiveness of a new drug, building material, or other intervention that has benefits. There is a benefit or connection that the researchers hope to identify. Unfortunately, no effect may exist. In statistics, we call this lack of an effect the null hypothesis. Researchers assume that this notion of no effect is correct until they have enough evidence to suggest otherwise, similar to how a trial presumes innocence.
In this context, the analysts don’t necessarily believe the null hypothesis is correct. In fact, they typically want to reject it because that leads to more exciting finds about an effect or relationship. The new vaccine works!
You can think of it as the default theory that requires sufficiently strong evidence to reject. Like a prosecutor, researchers must collect sufficient evidence to overturn the presumption of no effect. Investigators must work hard to set up a study and a data collection system to obtain evidence that can reject the null hypothesis.
Related post : What is an Effect in Statistics?
Null Hypothesis Examples
Null hypotheses start as research questions that the investigator rephrases as a statement indicating there is no effect or relationship.
Does the vaccine prevent infections? | The vaccine does not affect the infection rate. |
Does the new additive increase product strength? | The additive does not affect mean product strength. |
Does the exercise intervention increase bone mineral density? | The intervention does not affect bone mineral density. |
As screen time increases, does test performance decrease? | There is no relationship between screen time and test performance. |
After reading these examples, you might think they’re a bit boring and pointless. However, the key is to remember that the null hypothesis defines the condition that the researchers need to discredit before suggesting an effect exists.
Let’s see how you reject the null hypothesis and get to those more exciting findings!
When to Reject the Null Hypothesis
So, you want to reject the null hypothesis, but how and when can you do that? To start, you’ll need to perform a statistical test on your data. The following is an overview of performing a study that uses a hypothesis test.
The first step is to devise a research question and the appropriate null hypothesis. After that, the investigators need to formulate an experimental design and data collection procedures that will allow them to gather data that can answer the research question. Then they collect the data. For more information about designing a scientific study that uses statistics, read my post 5 Steps for Conducting Studies with Statistics .
After data collection is complete, statistics and hypothesis testing enter the picture. Hypothesis testing takes your sample data and evaluates how consistent they are with the null hypothesis. The p-value is a crucial part of the statistical results because it quantifies how strongly the sample data contradict the null hypothesis.
When the sample data provide sufficient evidence, you can reject the null hypothesis. In a hypothesis test, this process involves comparing the p-value to your significance level .
Rejecting the Null Hypothesis
Reject the null hypothesis when the p-value is less than or equal to your significance level. Your sample data favor the alternative hypothesis, which suggests that the effect exists in the population. For a mnemonic device, remember—when the p-value is low, the null must go!
When you can reject the null hypothesis, your results are statistically significant. Learn more about Statistical Significance: Definition & Meaning .
Failing to Reject the Null Hypothesis
Conversely, when the p-value is greater than your significance level, you fail to reject the null hypothesis. The sample data provides insufficient data to conclude that the effect exists in the population. When the p-value is high, the null must fly!
Note that failing to reject the null is not the same as proving it. For more information about the difference, read my post about Failing to Reject the Null .
That’s a very general look at the process. But I hope you can see how the path to more exciting findings depends on being able to rule out the less exciting null hypothesis that states there’s nothing to see here!
Let’s move on to learning how to write the null hypothesis for different types of effects, relationships, and tests.
Related posts : How Hypothesis Tests Work and Interpreting P-values
How to Write a Null Hypothesis
The null hypothesis varies by the type of statistic and hypothesis test. Remember that inferential statistics use samples to draw conclusions about populations. Consequently, when you write a null hypothesis, it must make a claim about the relevant population parameter . Further, that claim usually indicates that the effect does not exist in the population. Below are typical examples of writing a null hypothesis for various parameters and hypothesis tests.
Related posts : Descriptive vs. Inferential Statistics and Populations, Parameters, and Samples in Inferential Statistics
Group Means
T-tests and ANOVA assess the differences between group means. For these tests, the null hypothesis states that there is no difference between group means in the population. In other words, the experimental conditions that define the groups do not affect the mean outcome. Mu (µ) is the population parameter for the mean, and you’ll need to include it in the statement for this type of study.
For example, an experiment compares the mean bone density changes for a new osteoporosis medication. The control group does not receive the medicine, while the treatment group does. The null states that the mean bone density changes for the control and treatment groups are equal.
- Null Hypothesis H 0 : Group means are equal in the population: µ 1 = µ 2 , or µ 1 – µ 2 = 0
- Alternative Hypothesis H A : Group means are not equal in the population: µ 1 ≠ µ 2 , or µ 1 – µ 2 ≠ 0.
Group Proportions
Proportions tests assess the differences between group proportions. For these tests, the null hypothesis states that there is no difference between group proportions. Again, the experimental conditions did not affect the proportion of events in the groups. P is the population proportion parameter that you’ll need to include.
For example, a vaccine experiment compares the infection rate in the treatment group to the control group. The treatment group receives the vaccine, while the control group does not. The null states that the infection rates for the control and treatment groups are equal.
- Null Hypothesis H 0 : Group proportions are equal in the population: p 1 = p 2 .
- Alternative Hypothesis H A : Group proportions are not equal in the population: p 1 ≠ p 2 .
Correlation and Regression Coefficients
Some studies assess the relationship between two continuous variables rather than differences between groups.
In these studies, analysts often use either correlation or regression analysis . For these tests, the null states that there is no relationship between the variables. Specifically, it says that the correlation or regression coefficient is zero. As one variable increases, there is no tendency for the other variable to increase or decrease. Rho (ρ) is the population correlation parameter and beta (β) is the regression coefficient parameter.
For example, a study assesses the relationship between screen time and test performance. The null states that there is no correlation between this pair of variables. As screen time increases, test performance does not tend to increase or decrease.
- Null Hypothesis H 0 : The correlation in the population is zero: ρ = 0.
- Alternative Hypothesis H A : The correlation in the population is not zero: ρ ≠ 0.
For all these cases, the analysts define the hypotheses before the study. After collecting the data, they perform a hypothesis test to determine whether they can reject the null hypothesis.
The preceding examples are all for two-tailed hypothesis tests. To learn about one-tailed tests and how to write a null hypothesis for them, read my post One-Tailed vs. Two-Tailed Tests .
Related post : Understanding Correlation
Neyman, J; Pearson, E. S. (January 1, 1933). On the Problem of the most Efficient Tests of Statistical Hypotheses . Philosophical Transactions of the Royal Society A . 231 (694–706): 289–337.
Share this:
![null hypothesis spss null hypothesis spss](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)
Reader Interactions
January 11, 2024 at 2:57 pm
Thanks for the reply.
January 10, 2024 at 1:23 pm
Hi Jim, In your comment you state that equivalence test null and alternate hypotheses are reversed. For hypothesis tests of data fits to a probability distribution, the null hypothesis is that the probability distribution fits the data. Is this correct?
January 10, 2024 at 2:15 pm
Those two separate things, equivalence testing and normality tests. But, yes, you’re correct for both.
Hypotheses are switched for equivalence testing. You need to “work” (i.e., collect a large sample of good quality data) to be able to reject the null that the groups are different to be able to conclude they’re the same.
With typical hypothesis tests, if you have low quality data and a low sample size, you’ll fail to reject the null that they’re the same, concluding they’re equivalent. But that’s more a statement about the low quality and small sample size than anything to do with the groups being equal.
So, equivalence testing make you work to obtain a finding that the groups are the same (at least within some amount you define as a trivial difference).
For normality testing, and other distribution tests, the null states that the data follow the distribution (normal or whatever). If you reject the null, you have sufficient evidence to conclude that your sample data don’t follow the probability distribution. That’s a rare case where you hope to fail to reject the null. And it suffers from the problem I describe above where you might fail to reject the null simply because you have a small sample size. In that case, you’d conclude the data follow the probability distribution but it’s more that you don’t have enough data for the test to register the deviation. In this scenario, if you had a larger sample size, you’d reject the null and conclude it doesn’t follow that distribution.
I don’t know of any equivalence testing type approach for distribution fit tests where you’d need to work to show the data follow a distribution, although I haven’t looked for one either!
February 20, 2022 at 9:26 pm
Is a null hypothesis regularly (always) stated in the negative? “there is no” or “does not”
February 23, 2022 at 9:21 pm
Typically, the null hypothesis includes an equal sign. The null hypothesis states that the population parameter equals a particular value. That value is usually one that represents no effect. In the case of a one-sided hypothesis test, the null still contains an equal sign but it’s “greater than or equal to” or “less than or equal to.” If you wanted to translate the null hypothesis from its native mathematical expression, you could use the expression “there is no effect.” But the mathematical form more specifically states what it’s testing.
It’s the alternative hypothesis that typically contains does not equal.
There are some exceptions. For example, in an equivalence test where the researchers want to show that two things are equal, the null hypothesis states that they’re not equal.
In short, the null hypothesis states the condition that the researchers hope to reject. They need to work hard to set up an experiment and data collection that’ll gather enough evidence to be able to reject the null condition.
February 15, 2022 at 9:32 am
Dear sir I always read your notes on Research methods.. Kindly tell is there any available Book on all these..wonderfull Urgent
Comments and Questions Cancel reply
![null hypothesis spss SPSS tutorials website header logo](https://www.spss-tutorials.com/wp-content/themes/spss-tutorials-11/img/spss-tutorials-logo-44.png)
SPSS Paired Samples T-Test Tutorial
A paired samples t-test examines if 2 variables are likely to have equal population means.
Paired Samples T-Test Assumptions
Spss paired samples t-test dialogs, paired samples t-test output, effect size - cohen’s d, testing the normality assumption.
A teacher developed 3 exams for the same course. He needs to know if they're equally difficult so he asks his students to complete all 3 exams in random order. Only 19 students volunteer. Their data -partly shown below- are in compare-exams.sav . They hold the number of correct answers for each student on all 3 exams.
![null hypothesis spss Paired Samples T-Test Example Data](https://spss-tutorials.com/img/paired-samples-t-test-example-data.png)
Null Hypothesis
Generally, the null hypothesis for a paired samples t-test is that 2 variables have equal population means. Now, we don't have data on the entire student population. We only have a sample of N = 19 students and sample outcomes tend to differ from population outcomes. So even if the population means are really equal, our sample means may differ a bit. However, very different sample means are unlikely and thus suggest that the population means aren't equal after all. So are the sample means different enough to draw this conclusion? We'll answer just that by running a paired samples t-test on each pair of exams. However, this test requires some assumptions so let's look into those first.
Technically, a paired samples t-test is equivalent to a one sample t-test on difference scores. It therefore requires the same 2 assumptions. These are
- independent observations ;
- normality : the difference scores must be normally distributed in the population. Normality is only needed for small sample sizes, say N < 25 or so.
Our exam data probably hold independent observations: each case holds a separate student who didn't interact with the other students while completing the exams. Since we've only N = 19 students, we do require the normality assumption. The only way to look into this is actually computing the difference scores between each pair of examns as new variables in our data. We'll do so later on.
At this point, you should carefully inspect your data. At the very least, run some histograms over the outcome variables and see if these look plausible. If necessary, set and count missing values for each variable as well. If all is good, proceed with the actual tests as shown below.
![null hypothesis spss SPSS Menu Arrow](https://spss-tutorials.com/img/spss-menu-arrow.png)
Paired Samples T-Test Syntax
SPSS creates 3 output tables when running the test. The last one - Paired Samples Test - shows the actual test results.
![null hypothesis spss SPSS Paired Samples T-Test Output](https://spss-tutorials.com/img/spss-paired-samples-t-test-output.png)
In a similar vein, the second test (not shown) indicates that the means for exams 1 and 3 do differ statistically significantly, t(18) = 2.46, p = 0.025. The same goes for the final test between exams 2 and 3.
Our t-tests show that exam 3 has a lower mean score than the other 2 exams. The next question is: are the differences large or small? One way to answer this is computing an effect size measure. For t-tests, Cohen’s D is often used. Sadly, SPSS 27 is the only version that includes it. However, it's easily computed in Excel as shown below.
![null hypothesis spss SPSS Paired Samples T-Test Effect Size Cohens D](https://spss-tutorials.com/img/spss-paired-samples-t-test-effect-size-cohens-d.png)
The effect sizes thus obtained are
- d = -0.23 (pair 1) - roughly a small effect;
- d = 0.56 (pair 2) - slightly over a medium effect;
- d = 0.57 (pair 3) - slightly over a medium effect.
Interpretational Issues
Thus far, we compared 3 pairs of exams using 3 t-tests. A shortcoming here is that all 3 tests use the same tiny student sample. This increases the risk that at least 1 test is statistically significant just by chance. There's 2 basic solutions for this:
- apply a Bonferroni correction in order to adjust the significance levels;
- run a repeated measures ANOVA on all 3 exams simultaneously.
If you choose the ANOVA approach, you may want to follow it up with post hoc tests. And these are -guess what?- Bonferroni corrected t-tests again...
Thus far, we blindly assumed that the normality assumption for our paired samples t-tests holds. Since we've a small sample of N = 19 students, we do need this assumption. The only way to evaluate it, is computing the actual difference scores as new variables in our data. We'll do so with the syntax below.
![null hypothesis spss SPSS Difference Scores In Example Data](https://spss-tutorials.com/img/spss-difference-scores-in-example-data.png)
We can now test the normality assumption by running
- a Shapiro-Wilk test or
- a Kolmogorov-Smirnov test .
on our newly created difference scores. Since we discussed both tests in separate tutorials, we'll limit ourselves to the syntax below.
![null hypothesis spss SPSS Normality Test Output](https://spss-tutorials.com/img/spss-normality-test-output.png)
Conclusion: the difference scores between exams 1 and 2 are unlikely to be normally distributed in the population. This violates the normality assumption required by our t-test. This implies that we should perhaps not run a t-test at all on exams 1 and 2. A good alternative for comparing these variables is a Wilcoxon signed-ranks test as this doesn't require any normality assumption.
Last, if you compute difference scores, you can circumvent the paired samples t-tests altogether: instead, you can run one-sample t-tests on the difference scores with zeroes as test values. The syntax below does just that. If you run it, you'll get the exact same results as from the previous paired samples tests.
Right, so that'll do for today. Hope you found this tutorial helpful. And as always:
thanks for reading!
Tell us what you think!
This tutorial has 19 comments:.
By kidest on January 23rd, 2020
Good one it helps me
By Patrick Guziewicz on March 27th, 2020
Nice overview! Only comment would be that in standard nomenclature (at least for APA) would be not to use p=.00, it would be p<.001 since a normal distribution never touches zero. Best and thank you!
By Ruben Geert van den Berg on March 28th, 2020
Hi Patrick, thanks for your feedback!
We actually started rewriting this tutorial from scratch yesterday because we've some more issues with it:
-it doesn't test the normality assumption required for this test -only needed for small sample sizes (say N < 25 or so); -it doesn't mention Cohen’s D , the effect size for this test.
But anyway, we think APA recommendations usually suck and they should also be rewritten from scratch after serious debate with some good statisticians.
Regarding p-values, our view is that more accurate is always better than less accurate. You're technically right that neither the normal distribution nor the t-distribution ever comes up with exact zero probabilities because they both run from -∞ to +∞.
However, we didn't say exactly zero: taking rounding into regard, 0.00 may be any value between (exactly) 0 and 0.0049. That is, we don't use 0, 0.0, 0.00 and 0.000 interchangeably. Perhaps scientific notation would be appropriate here.
In any case, we feel that effect size and confidence intervals deserve more attention than p-values and most researchers -as well as the APA- do a very poor job there.
Have a great weekend!
SPSS tutorials
By Joyce A. Harris-Stokes on September 9th, 2021
Very helpful information. Without it I would not know what to do.
Hypothesis Testing: SPSS (2.1)
![null hypothesis spss license](https://www.instructables.com/assets/img/license/by-nc-sa_small.png)
Introduction: Hypothesis Testing: SPSS (2.1)
![null hypothesis spss myCSULA](https://content.instructables.com/FAC/QQXJ/IQK3S8MK/FACQQXJIQK3S8MK.png?auto=webp&crop=1%3A1&frame=1&width=130)
Recommendations
![null hypothesis spss Tiny PC (Nostalgia Edition)](https://content.instructables.com/FKW/KF0I/LZIFL01X/FKWKF0ILZIFL01X.jpg?auto=webp&crop=1.2%3A1&frame=1&width=306)
Outdoor Life Contest
![null hypothesis spss Outdoor Life Contest](https://content.instructables.com/FOG/PPP0/LXVUIG5S/FOGPPP0LXVUIG5S.jpg?auto=webp&crop=1240%2C600&fit=bounds&frame=1&height=620&width=620)
Woodworking Contest
![null hypothesis spss Woodworking Contest](https://content.instructables.com/F6K/D4XP/LYEF8Y3Q/F6KD4XPLYEF8Y3Q.jpg?auto=webp&crop=1240%2C600&fit=bounds&frame=1&height=620&width=620)
Microcontrollers Contest
![null hypothesis spss Microcontrollers Contest](https://content.instructables.com/F0P/EWRI/LZVJW1CA/F0PEWRILZVJW1CA.jpg?auto=webp&crop=1240%2C600&fit=bounds&frame=1&height=620&width=620)
Have a language expert improve your writing
Run a free plagiarism check in 10 minutes, generate accurate citations for free.
- Knowledge Base
- Null and Alternative Hypotheses | Definitions & Examples
Null & Alternative Hypotheses | Definitions, Templates & Examples
Published on May 6, 2022 by Shaun Turney . Revised on June 22, 2023.
The null and alternative hypotheses are two competing claims that researchers weigh evidence for and against using a statistical test :
- Null hypothesis ( H 0 ): There’s no effect in the population .
- Alternative hypothesis ( H a or H 1 ) : There’s an effect in the population.
Table of contents
Answering your research question with hypotheses, what is a null hypothesis, what is an alternative hypothesis, similarities and differences between null and alternative hypotheses, how to write null and alternative hypotheses, other interesting articles, frequently asked questions.
The null and alternative hypotheses offer competing answers to your research question . When the research question asks “Does the independent variable affect the dependent variable?”:
- The null hypothesis ( H 0 ) answers “No, there’s no effect in the population.”
- The alternative hypothesis ( H a ) answers “Yes, there is an effect in the population.”
The null and alternative are always claims about the population. That’s because the goal of hypothesis testing is to make inferences about a population based on a sample . Often, we infer whether there’s an effect in the population by looking at differences between groups or relationships between variables in the sample. It’s critical for your research to write strong hypotheses .
You can use a statistical test to decide whether the evidence favors the null or alternative hypothesis. Each type of statistical test comes with a specific way of phrasing the null and alternative hypothesis. However, the hypotheses can also be phrased in a general way that applies to any test.
Here's why students love Scribbr's proofreading services
Discover proofreading & editing
The null hypothesis is the claim that there’s no effect in the population.
If the sample provides enough evidence against the claim that there’s no effect in the population ( p ≤ α), then we can reject the null hypothesis . Otherwise, we fail to reject the null hypothesis.
Although “fail to reject” may sound awkward, it’s the only wording that statisticians accept . Be careful not to say you “prove” or “accept” the null hypothesis.
Null hypotheses often include phrases such as “no effect,” “no difference,” or “no relationship.” When written in mathematical terms, they always include an equality (usually =, but sometimes ≥ or ≤).
You can never know with complete certainty whether there is an effect in the population. Some percentage of the time, your inference about the population will be incorrect. When you incorrectly reject the null hypothesis, it’s called a type I error . When you incorrectly fail to reject it, it’s a type II error.
Examples of null hypotheses
The table below gives examples of research questions and null hypotheses. There’s always more than one way to answer a research question, but these null hypotheses can help you get started.
( ) | ||
Does tooth flossing affect the number of cavities? | Tooth flossing has on the number of cavities. | test: The mean number of cavities per person does not differ between the flossing group (µ ) and the non-flossing group (µ ) in the population; µ = µ . |
Does the amount of text highlighted in the textbook affect exam scores? | The amount of text highlighted in the textbook has on exam scores. | : There is no relationship between the amount of text highlighted and exam scores in the population; β = 0. |
Does daily meditation decrease the incidence of depression? | Daily meditation the incidence of depression.* | test: The proportion of people with depression in the daily-meditation group ( ) is greater than or equal to the no-meditation group ( ) in the population; ≥ . |
*Note that some researchers prefer to always write the null hypothesis in terms of “no effect” and “=”. It would be fine to say that daily meditation has no effect on the incidence of depression and p 1 = p 2 .
The alternative hypothesis ( H a ) is the other answer to your research question . It claims that there’s an effect in the population.
Often, your alternative hypothesis is the same as your research hypothesis. In other words, it’s the claim that you expect or hope will be true.
The alternative hypothesis is the complement to the null hypothesis. Null and alternative hypotheses are exhaustive, meaning that together they cover every possible outcome. They are also mutually exclusive, meaning that only one can be true at a time.
Alternative hypotheses often include phrases such as “an effect,” “a difference,” or “a relationship.” When alternative hypotheses are written in mathematical terms, they always include an inequality (usually ≠, but sometimes < or >). As with null hypotheses, there are many acceptable ways to phrase an alternative hypothesis.
Examples of alternative hypotheses
The table below gives examples of research questions and alternative hypotheses to help you get started with formulating your own.
Does tooth flossing affect the number of cavities? | Tooth flossing has an on the number of cavities. | test: The mean number of cavities per person differs between the flossing group (µ ) and the non-flossing group (µ ) in the population; µ ≠ µ . |
Does the amount of text highlighted in a textbook affect exam scores? | The amount of text highlighted in the textbook has an on exam scores. | : There is a relationship between the amount of text highlighted and exam scores in the population; β ≠ 0. |
Does daily meditation decrease the incidence of depression? | Daily meditation the incidence of depression. | test: The proportion of people with depression in the daily-meditation group ( ) is less than the no-meditation group ( ) in the population; < . |
Null and alternative hypotheses are similar in some ways:
- They’re both answers to the research question.
- They both make claims about the population.
- They’re both evaluated by statistical tests.
However, there are important differences between the two types of hypotheses, summarized in the following table.
A claim that there is in the population. | A claim that there is in the population. | |
| ||
Equality symbol (=, ≥, or ≤) | Inequality symbol (≠, <, or >) | |
Rejected | Supported | |
Failed to reject | Not supported |
To help you write your hypotheses, you can use the template sentences below. If you know which statistical test you’re going to use, you can use the test-specific template sentences. Otherwise, you can use the general template sentences.
General template sentences
The only thing you need to know to use these general template sentences are your dependent and independent variables. To write your research question, null hypothesis, and alternative hypothesis, fill in the following sentences with your variables:
Does independent variable affect dependent variable ?
- Null hypothesis ( H 0 ): Independent variable does not affect dependent variable.
- Alternative hypothesis ( H a ): Independent variable affects dependent variable.
Test-specific template sentences
Once you know the statistical test you’ll be using, you can write your hypotheses in a more precise and mathematical way specific to the test you chose. The table below provides template sentences for common statistical tests.
( ) | ||
test
with two groups | The mean dependent variable does not differ between group 1 (µ ) and group 2 (µ ) in the population; µ = µ . | The mean dependent variable differs between group 1 (µ ) and group 2 (µ ) in the population; µ ≠ µ . |
with three groups | The mean dependent variable does not differ between group 1 (µ ), group 2 (µ ), and group 3 (µ ) in the population; µ = µ = µ . | The mean dependent variable of group 1 (µ ), group 2 (µ ), and group 3 (µ ) are not all equal in the population. |
There is no correlation between independent variable and dependent variable in the population; ρ = 0. | There is a correlation between independent variable and dependent variable in the population; ρ ≠ 0. | |
There is no relationship between independent variable and dependent variable in the population; β = 0. | There is a relationship between independent variable and dependent variable in the population; β ≠ 0. | |
Two-proportions test | The dependent variable expressed as a proportion does not differ between group 1 ( ) and group 2 ( ) in the population; = . | The dependent variable expressed as a proportion differs between group 1 ( ) and group 2 ( ) in the population; ≠ . |
Note: The template sentences above assume that you’re performing one-tailed tests . One-tailed tests are appropriate for most studies.
If you want to know more about statistics , methodology , or research bias , make sure to check out some of our other articles with explanations and examples.
- Normal distribution
- Descriptive statistics
- Measures of central tendency
- Correlation coefficient
Methodology
- Cluster sampling
- Stratified sampling
- Types of interviews
- Cohort study
- Thematic analysis
Research bias
- Implicit bias
- Cognitive bias
- Survivorship bias
- Availability heuristic
- Nonresponse bias
- Regression to the mean
Hypothesis testing is a formal procedure for investigating our ideas about the world using statistics. It is used by scientists to test specific predictions, called hypotheses , by calculating how likely it is that a pattern or relationship between variables could have arisen by chance.
Null and alternative hypotheses are used in statistical hypothesis testing . The null hypothesis of a test always predicts no effect or no relationship between variables, while the alternative hypothesis states your research prediction of an effect or relationship.
The null hypothesis is often abbreviated as H 0 . When the null hypothesis is written using mathematical symbols, it always includes an equality symbol (usually =, but sometimes ≥ or ≤).
The alternative hypothesis is often abbreviated as H a or H 1 . When the alternative hypothesis is written using mathematical symbols, it always includes an inequality symbol (usually ≠, but sometimes < or >).
A research hypothesis is your proposed answer to your research question. The research hypothesis usually includes an explanation (“ x affects y because …”).
A statistical hypothesis, on the other hand, is a mathematical statement about a population parameter. Statistical hypotheses always come in pairs: the null and alternative hypotheses . In a well-designed study , the statistical hypotheses correspond logically to the research hypothesis.
![](http://ustaliy.fun/777/templates/cheerup/res/banner1.gif)
Cite this Scribbr article
If you want to cite this source, you can copy and paste the citation or click the “Cite this Scribbr article” button to automatically add the citation to our free Citation Generator.
Turney, S. (2023, June 22). Null & Alternative Hypotheses | Definitions, Templates & Examples. Scribbr. Retrieved August 21, 2024, from https://www.scribbr.com/statistics/null-and-alternative-hypotheses/
Is this article helpful?
![null hypothesis spss Shaun Turney](https://www.scribbr.com/wp-content/uploads/2022/04/scribbr-shaun-turney.jpg)
Shaun Turney
Other students also liked, inferential statistics | an easy introduction & examples, hypothesis testing | a step-by-step guide with easy examples, type i & type ii errors | differences, examples, visualizations, what is your plagiarism score.
One-Sample T-Test using SPSS Statistics
Introduction.
The one-sample t-test is used to determine whether a sample comes from a population with a specific mean. This population mean is not always known, but is sometimes hypothesized. For example, you want to show that a new teaching method for pupils struggling to learn English grammar can improve their grammar skills to the national average. Your sample would be pupils who received the new teaching method and your population mean would be the national average score. Alternately, you believe that doctors that work in Accident and Emergency (A & E) departments work 100 hour per week despite the dangers (e.g., tiredness) of working such long hours. You sample 1000 doctors in A & E departments and see if their hours differ from 100 hours.
This "quick start" guide shows you how to carry out a one-sample t-test using SPSS Statistics, as well as interpret and report the results from this test. However, before we introduce you to this procedure, you need to understand the different assumptions that your data must meet in order for a one-sample t-test to give you a valid result. We discuss these assumptions next.
SPSS Statistics
Assumptions.
When you choose to analyse your data using a one-sample t-test, part of the process involves checking to make sure that the data you want to analyse can actually be analysed using a one-sample t-test. You need to do this because it is only appropriate to use a one-sample t-test if your data "passes" four assumptions that are required for a one-sample t-test to give you a valid result. In practice, checking for these four assumptions just adds a little bit more time to your analysis, requiring you to click a few more buttons in SPSS Statistics when performing your analysis, as well as think a little bit more about your data, but it is not a difficult task.
Before we introduce you to these four assumptions, do not be surprised if, when analysing your own data using SPSS Statistics, one or more of these assumptions is violated (i.e., is not met). This is not uncommon when working with real-world data rather than textbook examples, which often only show you how to carry out a one-sample t-test when everything goes well! However, don’t worry. Even when your data fails certain assumptions, there is often a solution to overcome this. First, let’s take a look at these four assumptions:
- Assumption #1: Your dependent variable should be measured at the interval or ratio level (i.e., continuous ). Examples of variables that meet this criterion include revision time (measured in hours), intelligence (measured using IQ score), exam performance (measured from 0 to 100), weight (measured in kg), and so forth. You can learn more about interval and ratio variables in our article: Types of Variable .
- Assumption #2: The data are independent (i.e., not correlated/related ), which means that there is no relationship between the observations. This is more of a study design issue than something you can test for, but it is an important assumption of the one-sample t-test.
- Assumption #3: There should be no significant outliers . Outliers are data points within your data that do not follow the usual pattern (e.g., in a study of 100 students' IQ scores, where the mean score was 108 with only a small variation between students, one student had a score of 156, which is very unusual, and may even put her in the top 1% of IQ scores globally). The problem with outliers is that they can have a negative effect on the one-sample t-test, reducing the accuracy of your results. Fortunately, when using SPSS Statistics to run a one-sample t-test on your data, you can easily detect possible outliers. In our enhanced one-sample t-test guide, we: (a) show you how to detect outliers using SPSS Statistics; and (b) discuss some of the options you have in order to deal with outliers.
- Assumption #4: Your dependent variable should be approximately normally distributed . We talk about the one-sample t-test only requiring approximately normal data because it is quite "robust" to violations of normality, meaning that the assumption can be a little violated and still provide valid results. You can test for normality using the Shapiro-Wilk test of normality, which is easily tested for using SPSS Statistics. In addition to showing you how to do this in our enhanced one-sample t-test guide, we also explain what you can do if your data fails this assumption (i.e., if it fails it more than a little bit).
You can check assumptions #3 and #4 using SPSS Statistics. Before doing this, you should make sure that your data meets assumptions #1 and #2, although you don't need SPSS Statistics to do this. When moving on to assumptions #3 and #4, we suggest testing them in this order because it represents an order where, if a violation to the assumption is not correctable, you will no longer be able to use a one-sample t-test. Just remember that if you do not run the statistical tests on these assumptions correctly, the results you get when running a one-sample t-test might not be valid. This is why we dedicate a number of sections of our enhanced one-sample t-test guide to help you get this right. You can find out about our enhanced content on our Features: Overview page.
In the section, Procedure , we illustrate the SPSS Statistics procedure required to perform a one-sample t-test assuming that no assumptions have been violated. First, we set out the example we use to explain the one-sample t-test procedure in SPSS Statistics.
![null hypothesis spss Testimonials](https://statistics.laerd.com/img/third-spss-image.png)
Example and Setup in SPSS Statistics
A researcher is planning a psychological intervention study, but before he proceeds he wants to characterise his participants' depression levels. He tests each participant on a particular depression index, where anyone who achieves a score of 4.0 is deemed to have 'normal' levels of depression. Lower scores indicate less depression and higher scores indicate greater depression. He has recruited 40 participants to take part in the study. Depression scores are recorded in the variable dep_score . He wants to know whether his sample is representative of the normal population (i.e., do they score statistically significantly differently from 4.0).
For a one-sample t-test, there will only be one variable's data to be entered into SPSS Statistics: the dependent variable, dep_score , which is the depression score.
Test Procedure in SPSS Statistics
The 5-step Compare Means > One-Sample T Test... procedure below shows you how to analyse your data using a one-sample t-test in SPSS Statistics when the four assumptions in the previous section, Assumptions , have not been violated. At the end of these five steps, we show you how to interpret the results from this test. If you are looking for help to make sure your data meets assumptions #3 and #4, which are required when using a one-sample t-test, and can be tested using SPSS Statistics, you can learn more in our enhanced guides on our Features: Overview page.
Since some of the options in the Compare Means > One-Sample T Test... procedure changed in SPSS Statistics version 27 , we show how to carry out a one-sample t-test depending on whether you have SPSS Statistics versions 27 or 28 (or the subscription version of SPSS Statistics) or version 26 or an earlier version of SPSS Statistics . The latest versions of SPSS Statistics are version 28 and the subscription version . If you are unsure which version of SPSS Statistics you are using, see our guide: Identifying your version of SPSS Statistics .
SPSS Statistics versions 27 and 28 and the subscription version of SPSS Statistics
![null hypothesis spss Shows the SPSS Statistics menu for the one-sample t-test](https://statistics.laerd.com/img/ostt/menu-one-sample-t-test-v27.png)
Published with written permission from SPSS Statistics, IBM Corporation.
![null hypothesis spss 'One-Sample T Test' dialogue box with the dependent variable, 'dep_score', in the box on the left](https://statistics.laerd.com/img/ostt/one-sample-t-test-dialogue-box-v27.png)
Note 1: By default, SPSS Statistics uses 95% confidence intervals (labelled as the C onfidence Interval Percentage in SPSS Statistics). This equates to declaring statistical significance at the p < .05 level. If you wish to change this you can enter any value from 1 to 99. For example, entering "99" into this box would result in a 99% confidence interval and equate to declaring statistical significance at the p < .01 level. For this example, keep the default 95% confidence intervals.
Note 2: If you are testing more than one dependent variable and you have any missing values in your data, you need to think carefully about whether to select Exclude c a ses analysis by analysis or Exc l ude cases listwise ) in the –Missing Values– area. Selecting the incorrect option could mean that SPSS Statistics removes data from your analysis that you wanted to include. We discuss this further and what options to select in our enhanced one-sample t-test guide.
![null hypothesis spss Continue](https://statistics.laerd.com/img/ostt/button-continue-active-v27.png)
Now that you have run the Compare Means > One-Sample T Test... procedure to carry out a one-sample t-test, go to the Interpreting Results section. You can ignore the section below, which shows you how to carry out a one-sample t-test if you have SPSS Statistics version 26 or an earlier version of SPSS Statistics.
SPSS Statistics version 26 and earlier versions of SPSS Statistics
![null hypothesis spss Shows the SPSS Statistics menu for the one-sample t-test](https://statistics.laerd.com/img/ostt/one-sample-t-test-in-spss-statistics-menu.png)
Interpreting the SPSS Statistics output of the one-sample t-test
SPSS Statistics generates two main tables of output for the one-sample t-test that contains all the information you require to interpret the results of a one-sample t-test.
If your data passed assumption #3 (i.e., there were no significant outliers) and assumption #4 (i.e., your dependent variable was approximately normally distributed for each category of the independent variable), which we explained earlier in the Assumptions section, you will only need to interpret these two main tables. However, since you should have tested your data for these assumptions, you will also need to interpret the SPSS Statistics output that was produced when you tested for them (i.e., you will have to interpret: (a) the boxplots you used to check if there were any significant outliers; and (b) the output SPSS Statistics produces for your Shapiro-Wilk test of normality to determine normality). If you do not know how to do this, we show you in our enhanced one-sample t-test guide. Remember that if your data failed any of these assumptions, the output that you get from the one-sample t-test procedure (i.e., the tables we discuss below), will no longer be relevant, and you will need to interpret these tables differently.
However, in this "quick start" guide, we take you through each of the two main tables in turn, assuming that your data met all the relevant assumptions:
Descriptive statistics
You can make an initial interpretation of the data using the One-Sample Statistics table, which presents relevant descriptive statistics:
![null hypothesis spss 'One-Sample Statistics' table with columns 'N', 'Mean', 'Std. Deviation' & 'Std. Error Mean' shown for the dependent variable](https://statistics.laerd.com/img/ostt/table-statistics.png)
It is more common than not to present your descriptive statistics using the mean and standard deviation (" Std. Deviation " column) rather than the standard error of the mean (" Std. Error Mean " column), although both are acceptable. You could report the results, using the standard deviation, as follows:
Mean depression score (3.72 ± 0.74) was lower than the population 'normal' depression score of 4.0.
Mean depression score ( M = 3.72, SD = 0.74) was lower than the population 'normal' depression score of 4.0.
However, by running a one-sample t-test, you are really interested in knowing whether the sample you have ( dep_score ) comes from a 'normal' population (which has a mean of 4.0). This is discussed in the next section.
One-sample t-test
The One-Sample Test table reports the result of the one-sample t-test. The top row provides the value of the known or hypothesized population mean you are comparing your sample data to, as highlighted below:
![null hypothesis spss 'Test Value' of 4 is highlighted in the 'One-Sample Test' table in SPSS Statistics](https://statistics.laerd.com/img/ostt/table-one-sample-value-highlighted.png)
In this example, you can see the 'normal' depression score value of "4" that you entered in earlier. You now need to consult the first three columns of the One-Sample Test table, which provides information on whether the sample is from a population with a mean of 4 (i.e., are the means statistically significantly different), as highlighted below:
![null hypothesis spss 't', 'df' & 'Sig. (2-tailed)' values for the dependent variable, 'dep_score', are highlighted in the 'One-Sample Test' table](https://statistics.laerd.com/img/ostt/table-one-sample-1st-highlighted.png)
Moving from left-to-right, you are presented with the observed t -value (" t " column), the degrees of freedom (" df "), and the statistical significance ( p -value) (" Sig. (2-tailed) ") of the one-sample t-test. In this example, p < .05 (it is p = .022). Therefore, it can be concluded that the population means are statistically significantly different. If p > .05, the difference between the sample-estimated population mean and the comparison population mean would not be statistically significantly different.
Note: If you see SPSS Statistics state that the " Sig. (2-tailed) " value is ".000", this actually means that p < .0005. It does not mean that the significance level is actually zero.
SPSS Statistics also reports that t = -2.381 (" t " column) and that there are 39 degrees of freedom (" df " column). You need to know these values in order to report your results, which you could do as follows:
Depression score was statistically significantly lower than the population normal depression score, t (39) = -2.381, p = .022.
The breakdown of the last part (i.e., t (39) = -2.381, p = .022) is as follows:
![null hypothesis spss In following table, 1 = 't', 2 = '39', 3 = '-2.381', and 4 = 'p = .022'](https://statistics.laerd.com/img/ostt/t-formula.png)
Part | Meaning | ||
---|---|---|---|
1 | Indicates that we are comparing to a -distribution ( -test). | ||
2 | (39) | Indicates the degrees of freedom, which is - 1 | |
3 | -2.381 | Indicates the obtained value of the -statistic (obtained -value) | |
4 | = .022 | Indicates the probability of obtaining the observed -value if the null hypothesis is correct. | |
Table 4.1: Breakdown of a one-sample t-test statistical statement. |
You can also include measures of the difference between the two population means in your written report. This information is included in the columns on the far-right of the One-Sample Test table, as highlighted below:
![null hypothesis spss 'Mean Difference' & '95% Confidence Interval of the difference' values highlighted for the dependent variable, 'dep_score'](https://statistics.laerd.com/img/ostt/table-one-sample-2nd-highlighted.png)
This section of the table shows that the mean difference in the population means is -0.28 (" Mean Difference " column) and the 95% confidence intervals (95% CI) of the difference are -0.51 to -0.04 (" Lower " to " Upper " columns). For the measures used, it will be sufficient to report the values to 2 decimal places. You could write these results as:
Depression score was statistically significantly lower by 0.28 (95% CI, 0.04 to 0.51) than a normal depression score of 4.0, t (39) = -2.381, p = .022.
Depression score was statistically significantly lower by a mean of 0.28, 95% CI [0.04 to 0.51], than a normal depression score of 4.0, t (39) = -2.381, p = .022.
Standardised effect sizes
After reporting the unstandardised effect size, we might also report a standardised effect size such as Cohen's d (Cohen, 1988) or Hedges' g (Hedges, 1981). In our example, this may be useful for future studies where researchers want to compare the "size" of the effect in their studies to the size of the effect in this study.
There are many different types of standardised effect size, with different types often trying to "capture" the importance of your results in different ways. In SPSS Statistics versions 18 to 26 , SPSS Statistics did not automatically produce a standardised effect size as part of a one-sample t-test analysis. However, it is easy to calculate a standardised effect size such as Cohen's d (Cohen, 1988) using the results from the one-sample t-test analysis. In SPSS Statistics versions 27 and 28 (and the subscription version of SPSS Statistics), two standardised effect sizes are automatically produced: Cohen's d and Hedges' g , as shown in the One-Sample Effect Sizes table below:
![null hypothesis spss 'Cohen's d' & 'Hedges' g'. One-Sample Effect Sizes table. One-sample t-test in SPSS](https://statistics.laerd.com/img/ostt/one-sample-t-test-one-sample-effect-sizes-v27.png)
Reporting the SPSS Statistics output of the one-sample t-test
You can report the findings, without the tests of assumptions, as follows:
Mean depression score (3.73 ± 0.74) was lower than the normal depression score of 4.0, a statistically significant difference of 0.28 (95% CI, 0.04 to 0.51), t (39) = -2.381, p = .022.
Mean depression score ( M = 3.73, SD = 0.74) was lower than the normal depression score of 4.0, a statistically significant mean difference of 0.28, 95% CI [0.04 to 0.51], t (39) = -2.381, p = .022.
Adding in the information about the statistical test you ran, including the assumptions, you have:
A one-sample t-test was run to determine whether depression score in recruited subjects was different to normal, defined as a depression score of 4.0. Depression scores were normally distributed, as assessed by Shapiro-Wilk's test ( p > .05) and there were no outliers in the data, as assessed by inspection of a boxplot. Mean depression score (3.73 ± 0.74) was lower than the normal depression score of 4.0, a statistically significant difference of 0.28 (95% CI, 0.04 to 0.51), t (39) = -2.381, p = .022.
A one-sample t-test was run to determine whether depression score in recruited subjects was different to normal, defined as a depression score of 4.0. Depression scores were normally distributed, as assessed by Shapiro-Wilk's test ( p > .05) and there were no outliers in the data, as assessed by inspection of a boxplot. Mean depression score ( M = 3.73, SD = 0.74) was lower than the normal depression score of 4.0, a statistically significant mean difference of 0.28, 95% CI [0.04 to 0.51], t (39) = -2.381, p = .022.
Null hypothesis significance testing
You can write the result in respect of your null and alternative hypothesis as:
There was a statistically significant difference between means ( p < .05). Therefore, we can reject the null hypothesis and accept the alternative hypothesis.
Practical vs. statistical significance
Although a statistically significant difference was found between the depression scores in the recruited subjects vs. the normal depression score, it does not necessarily mean that the difference encountered, 0.28 (95% CI, 0.04 to 0.51), is enough to be practically significant. Indeed, the researcher might accept that although the difference is statistically significant (and would report this), the difference is not large enough to be practically significant (i.e., the subjects can be treated as normal).
In our enhanced one-sample t-test guide, we show you how to write up the results from your assumptions tests and one-sample t-test procedure if you need to report this in a dissertation/thesis, assignment or research report. We do this using the Harvard and APA styles. We also explain how to interpret the results from the One-Sample Effect Sizes table, which include the two standardised effect sizes: Cohen's d and Hedges' g . You can learn more about our enhanced content in our Features: Overview section.
![null hypothesis spss Logo for BCcampus Open Publishing](https://opentextbc.ca/researchmethods/wp-content/uploads/2023/09/cropped-BCcampus-logo-colour.png)
Want to create or adapt books like this? Learn more about how Pressbooks supports open publishing practices.
Chapter 13: Inferential Statistics
Some Basic Null Hypothesis Tests
Learning Objectives
- Conduct and interpret one-sample, dependent-samples, and independent-samples t tests.
- Interpret the results of one-way, repeated measures, and factorial ANOVAs.
- Conduct and interpret null hypothesis tests of Pearson’s r .
In this section, we look at several common null hypothesis testing procedures. The emphasis here is on providing enough information to allow you to conduct and interpret the most basic versions. In most cases, the online statistical analysis tools mentioned in Chapter 12 will handle the computations—as will programs such as Microsoft Excel and SPSS.
The t Test
As we have seen throughout this book, many studies in psychology focus on the difference between two means. The most common null hypothesis test for this type of statistical relationship is the t test . In this section, we look at three types of t tests that are used for slightly different research designs: the one-sample t test, the dependent-samples t test, and the independent-samples t test.
One-Sample t Test
The one-sample t test is used to compare a sample mean ( M ) with a hypothetical population mean (μ0) that provides some interesting standard of comparison. The null hypothesis is that the mean for the population (µ) is equal to the hypothetical population mean: μ = μ0. The alternative hypothesis is that the mean for the population is different from the hypothetical population mean: μ ≠ μ0. To decide between these two hypotheses, we need to find the probability of obtaining the sample mean (or one more extreme) if the null hypothesis were true. But finding this p value requires first computing a test statistic called t . (A test statistic is a statistic that is computed only to help find the p value.) The formula for t is as follows:
![Rendered by QuickLaTeX.com \[t=\dfrac{M-\mu_0}{\left(\dfrac{SD}{\sqrt{N}}\right)}\]](https://opentextbc.ca/researchmethods/wp-content/ql-cache/quicklatex.com-5cabf5ed8125558a7361164aadc41c78_l3.png)
Again, M is the sample mean and µ 0 is the hypothetical population mean of interest. SD is the sample standard deviation and N is the sample size.
The reason the t statistic (or any test statistic) is useful is that we know how it is distributed when the null hypothesis is true. As shown in Figure 13.1, this distribution is unimodal and symmetrical, and it has a mean of 0. Its precise shape depends on a statistical concept called the degrees of freedom, which for a one-sample t test is N − 1. (There are 24 degrees of freedom for the distribution shown in Figure 13.1.) The important point is that knowing this distribution makes it possible to find the p value for any t score. Consider, for example, a t score of +1.50 based on a sample of 25. The probability of a t score at least this extreme is given by the proportion of t scores in the distribution that are at least this extreme. For now, let us define extreme as being far from zero in either direction. Thus the p value is the proportion of t scores that are +1.50 or above or that are −1.50 or below—a value that turns out to be .14.
![null hypothesis spss Graph with one-tailed critical values of ±1.711 and two-tailed critical values of ±2.262.](https://opentextbc.ca/researchmethods/wp-content/uploads/sites/37/2019/08/Fig13-1.png)
Fortunately, we do not have to deal directly with the distribution of t scores. If we were to enter our sample data and hypothetical mean of interest into one of the online statistical tools in Chapter 12 or into a program like SPSS (Excel does not have a one-sample t test function), the output would include both the t score and the p value. At this point, the rest of the procedure is simple. If p is less than .05, we reject the null hypothesis and conclude that the population mean differs from the hypothetical mean of interest. If p is greater than .05, we retain the null hypothesis and conclude that there is not enough evidence to say that the population mean differs from the hypothetical mean of interest. (Again, technically, we conclude only that we do not have enough evidence to conclude that it does differ.)
If we were to compute the t score by hand, we could use a table like Table 13.2 to make the decision. This table does not provide actual p values. Instead, it provides the critical values of t for different degrees of freedom ( df) when α is .05. For now, let us focus on the two-tailed critical values in the last column of the table. Each of these values should be interpreted as a pair of values: one positive and one negative. For example, the two-tailed critical values when there are 24 degrees of freedom are +2.064 and −2.064. These are represented by the red vertical lines in Figure 13.1. The idea is that any t score below the lower critical value (the left-hand red line in Figure 13.1) is in the lowest 2.5% of the distribution, while any t score above the upper critical value (the right-hand red line) is in the highest 2.5% of the distribution. Therefore any t score beyond the critical value in either direction is in the most extreme 5% of t scores when the null hypothesis is true and has a p value less than .05. Thus if the t score we compute is beyond the critical value in either direction, then we reject the null hypothesis. If the t score we compute is between the upper and lower critical values, then we retain the null hypothesis.
One-tailed critical value | Two-tailed critical value | |
---|---|---|
3 | 2.353 | 3.182 |
4 | 2.132 | 2.776 |
5 | 2.015 | 2.571 |
6 | 1.943 | 2.447 |
7 | 1.895 | 2.365 |
8 | 1.860 | 2.306 |
9 | 1.833 | 2.262 |
10 | 1.812 | 2.228 |
11 | 1.796 | 2.201 |
12 | 1.782 | 2.179 |
13 | 1.771 | 2.160 |
14 | 1.761 | 2.145 |
15 | 1.753 | 2.131 |
16 | 1.746 | 2.120 |
17 | 1.740 | 2.110 |
18 | 1.734 | 2.101 |
19 | 1.729 | 2.093 |
20 | 1.725 | 2.086 |
21 | 1.721 | 2.080 |
22 | 1.717 | 2.074 |
23 | 1.714 | 2.069 |
24 | 1.711 | 2.064 |
25 | 1.708 | 2.060 |
30 | 1.697 | 2.042 |
35 | 1.690 | 2.030 |
40 | 1.684 | 2.021 |
45 | 1.679 | 2.014 |
50 | 1.676 | 2.009 |
60 | 1.671 | 2.000 |
70 | 1.667 | 1.994 |
80 | 1.664 | 1.990 |
90 | 1.662 | 1.987 |
100 | 1.660 | 1.984 |
Thus far, we have considered what is called a two-tailed test , where we reject the null hypothesis if the t score for the sample is extreme in either direction. This test makes sense when we believe that the sample mean might differ from the hypothetical population mean but we do not have good reason to expect the difference to go in a particular direction. But it is also possible to do a one-tailed test , where we reject the null hypothesis only if the t score for the sample is extreme in one direction that we specify before collecting the data. This test makes sense when we have good reason to expect the sample mean will differ from the hypothetical population mean in a particular direction.
Here is how it works. Each one-tailed critical value in Table 13.2 can again be interpreted as a pair of values: one positive and one negative. A t score below the lower critical value is in the lowest 5% of the distribution, and a t score above the upper critical value is in the highest 5% of the distribution. For 24 degrees of freedom, these values are −1.711 and +1.711. (These are represented by the green vertical lines in Figure 13.1.) However, for a one-tailed test, we must decide before collecting data whether we expect the sample mean to be lower than the hypothetical population mean, in which case we would use only the lower critical value, or we expect the sample mean to be greater than the hypothetical population mean, in which case we would use only the upper critical value. Notice that we still reject the null hypothesis when the t score for our sample is in the most extreme 5% of the t scores we would expect if the null hypothesis were true—so α remains at .05. We have simply redefined extreme to refer only to one tail of the distribution. The advantage of the one-tailed test is that critical values are less extreme. If the sample mean differs from the hypothetical population mean in the expected direction, then we have a better chance of rejecting the null hypothesis. The disadvantage is that if the sample mean differs from the hypothetical population mean in the unexpected direction, then there is no chance at all of rejecting the null hypothesis.
Example One-Sample t Test
Imagine that a health psychologist is interested in the accuracy of university students’ estimates of the number of calories in a chocolate chip cookie. He shows the cookie to a sample of 10 students and asks each one to estimate the number of calories in it. Because the actual number of calories in the cookie is 250, this is the hypothetical population mean of interest (µ 0 ). The null hypothesis is that the mean estimate for the population (μ) is 250. Because he has no real sense of whether the students will underestimate or overestimate the number of calories, he decides to do a two-tailed test. Now imagine further that the participants’ actual estimates are as follows:
250, 280, 200, 150, 175, 200, 200, 220, 180, 250
The mean estimate for the sample ( M ) is 212.00 calories and the standard deviation ( SD ) is 39.17. The health psychologist can now compute the t score for his sample:
![Rendered by QuickLaTeX.com \[t=\dfrac{212-250}{\left(\dfrac{39.17}{\sqrt{10}}\right)}=-3.07\]](https://opentextbc.ca/researchmethods/wp-content/ql-cache/quicklatex.com-db8519a8464a24c9b7486a9cbd7fdc6b_l3.png)
If he enters the data into one of the online analysis tools or uses SPSS, it would also tell him that the two-tailed p value for this t score (with 10 − 1 = 9 degrees of freedom) is .013. Because this is less than .05, the health psychologist would reject the null hypothesis and conclude that university students tend to underestimate the number of calories in a chocolate chip cookie. If he computes the t score by hand, he could look at Table 13.2 and see that the critical value of t for a two-tailed test with 9 degrees of freedom is ±2.262. The fact that his t score was more extreme than this critical value would tell him that his p value is less than .05 and that he should reject the null hypothesis.
Finally, if this researcher had gone into this study with good reason to expect that university students underestimate the number of calories, then he could have done a one-tailed test instead of a two-tailed test. The only thing this decision would change is the critical value, which would be −1.833. This slightly less extreme value would make it a bit easier to reject the null hypothesis. However, if it turned out that university students overestimate the number of calories—no matter how much they overestimate it—the researcher would not have been able to reject the null hypothesis.
The Dependent-Samples t Test
The dependent-samples t test (sometimes called the paired-samples t test) is used to compare two means for the same sample tested at two different times or under two different conditions. This comparison is appropriate for pretest-posttest designs or within-subjects experiments. The null hypothesis is that the means at the two times or under the two conditions are the same in the population. The alternative hypothesis is that they are not the same. This test can also be one-tailed if the researcher has good reason to expect the difference goes in a particular direction.
It helps to think of the dependent-samples t test as a special case of the one-sample t test. However, the first step in the dependent-samples t test is to reduce the two scores for each participant to a single difference score by taking the difference between them. At this point, the dependent-samples t test becomes a one-sample t test on the difference scores. The hypothetical population mean (µ 0 ) of interest is 0 because this is what the mean difference score would be if there were no difference on average between the two times or two conditions. We can now think of the null hypothesis as being that the mean difference score in the population is 0 (µ 0 = 0) and the alternative hypothesis as being that the mean difference score in the population is not 0 (µ 0 ≠ 0).
Example Dependent-Samples t Test
Imagine that the health psychologist now knows that people tend to underestimate the number of calories in junk food and has developed a short training program to improve their estimates. To test the effectiveness of this program, he conducts a pretest-posttest study in which 10 participants estimate the number of calories in a chocolate chip cookie before the training program and then again afterward. Because he expects the program to increase the participants’ estimates, he decides to do a one-tailed test. Now imagine further that the pretest estimates are
230, 250, 280, 175, 150, 200, 180, 210, 220, 190
and that the posttest estimates (for the same participants in the same order) are
250, 260, 250, 200, 160, 200, 200, 180, 230, 240
The difference scores, then, are as follows:
+20, +10, −30, +25, +10, 0, +20, −30, +10, +50
Note that it does not matter whether the first set of scores is subtracted from the second or the second from the first as long as it is done the same way for all participants. In this example, it makes sense to subtract the pretest estimates from the posttest estimates so that positive difference scores mean that the estimates went up after the training and negative difference scores mean the estimates went down.
The mean of the difference scores is 8.50 with a standard deviation of 27.27. The health psychologist can now compute the t score for his sample as follows:
![Rendered by QuickLaTeX.com \[t=\dfrac{8.5-0}{\left(\dfrac{27.27}{\sqrt{10}}\right)}=1.11\]](https://opentextbc.ca/researchmethods/wp-content/ql-cache/quicklatex.com-37d0f432a138ce195614d7cebaabb4d8_l3.png)
If he enters the data into one of the online analysis tools or uses Excel or SPSS, it would tell him that the one-tailed p value for this t score (again with 10 − 1 = 9 degrees of freedom) is .148. Because this is greater than .05, he would retain the null hypothesis and conclude that the training program does not increase people’s calorie estimates. If he were to compute the t score by hand, he could look at Table 13.2 and see that the critical value of t for a one-tailed test with 9 degrees of freedom is +1.833. (It is positive this time because he was expecting a positive mean difference score.) The fact that his t score was less extreme than this critical value would tell him that his p value is greater than .05 and that he should fail to reject the null hypothesis.
The Independent-Samples t Test
The independent-samples t test is used to compare the means of two separate samples ( M 1 and M 2 ). The two samples might have been tested under different conditions in a between-subjects experiment, or they could be preexisting groups in a correlational design (e.g., women and men, extraverts and introverts). The null hypothesis is that the means of the two populations are the same: µ 1 = µ 2 . The alternative hypothesis is that they are not the same: µ 1 ≠ µ 2 . Again, the test can be one-tailed if the researcher has good reason to expect the difference goes in a particular direction.
The t statistic here is a bit more complicated because it must take into account two sample means, two standard deviations, and two sample sizes. The formula is as follows:
![Rendered by QuickLaTeX.com \[t=\dfrac{M_1-M_2}{\sqrt{\dfrac{{SD_1}^2}{n_1}+\dfrac{{SD_2}^2}{n_2}}}\]](https://opentextbc.ca/researchmethods/wp-content/ql-cache/quicklatex.com-0242d1ab42d68adb3bb852a45bfb9b2d_l3.png)
Notice that this formula includes squared standard deviations (the variances) that appear inside the square root symbol. Also, lowercase n 1 and n 2 refer to the sample sizes in the two groups or condition (as opposed to capital N , which generally refers to the total sample size). The only additional thing to know here is that there are N − 2 degrees of freedom for the independent-samples t test.
Example Independent-Samples t Test
Now the health psychologist wants to compare the calorie estimates of people who regularly eat junk food with the estimates of people who rarely eat junk food. He believes the difference could come out in either direction so he decides to conduct a two-tailed test. He collects data from a sample of eight participants who eat junk food regularly and seven participants who rarely eat junk food. The data are as follows:
Junk food eaters: 180, 220, 150, 85, 200, 170, 150, 190
Non–junk food eaters: 200, 240, 190, 175, 200, 300, 240
The mean for the junk food eaters is 220.71 with a standard deviation of 41.23. The mean for the non–junk food eaters is 168.12 with a standard deviation of 42.66. He can now compute his t score as follows:
![Rendered by QuickLaTeX.com \[t=\dfrac{220.71-168.12}{\sqrt{\dfrac{41.23^2}{8}+\dfrac{42.66^2}{7}}}=2.42\]](https://opentextbc.ca/researchmethods/wp-content/ql-cache/quicklatex.com-8dd797ba37fac6e3618f34946daefb5b_l3.png)
If he enters the data into one of the online analysis tools or uses Excel or SPSS, it would tell him that the two-tailed p value for this t score (with 15 − 2 = 13 degrees of freedom) is .015. Because this p value is less than .05, the health psychologist would reject the null hypothesis and conclude that people who eat junk food regularly make lower calorie estimates than people who eat it rarely. If he were to compute the t score by hand, he could look at Table 13.2 and see that the critical value of t for a two-tailed test with 13 degrees of freedom is ±2.160. The fact that his t score was more extreme than this critical value would tell him that his p value is less than .05 and that he should fail to retain the null hypothesis.
The Analysis of Variance
When there are more than two groups or condition means to be compared, the most common null hypothesis test is the analysis of variance (ANOVA) . In this section, we look primarily at the one-way ANOVA , which is used for between-subjects designs with a single independent variable. We then briefly consider some other versions of the ANOVA that are used for within-subjects and factorial research designs.
One-Way ANOVA
The one-way ANOVA is used to compare the means of more than two samples ( M 1 , M 2 … M G ) in a between-subjects design. The null hypothesis is that all the means are equal in the population: µ 1 = µ 2 =…= µ G . The alternative hypothesis is that not all the means in the population are equal.
The test statistic for the ANOVA is called F . It is a ratio of two estimates of the population variance based on the sample data. One estimate of the population variance is called the mean squares between groups (MS B ) and is based on the differences among the sample means. The other is called the mean squares within groups (MS W ) and is based on the differences among the scores within each group. The F statistic is the ratio of the MS B to the MS W and can therefore be expressed as follows:
F = MS B ÷ MS W
Again, the reason that F is useful is that we know how it is distributed when the null hypothesis is true. As shown in Figure 13.2, this distribution is unimodal and positively skewed with values that cluster around 1. The precise shape of the distribution depends on both the number of groups and the sample size, and there is a degrees of freedom value associated with each of these. The between-groups degrees of freedom is the number of groups minus one: df B = ( G − 1). The within-groups degrees of freedom is the total sample size minus the number of groups: df W = N − G . Again, knowing the distribution of F when the null hypothesis is true allows us to find the p value.
![null hypothesis spss Line graph with a peak after 0, then a sharp descent. Critical value is approximately 2.8.](https://opentextbc.ca/researchmethods/wp-content/uploads/sites/37/2019/08/Fig13-2.png)
The online tools in Chapter 12 and statistical software such as Excel and SPSS will compute F and find the p value. If p is less than .05, then we reject the null hypothesis and conclude that there are differences among the group means in the population. If p is greater than .05, then we retain the null hypothesis and conclude that there is not enough evidence to say that there are differences. In the unlikely event that we would compute F by hand, we can use a table of critical values like Table 13.3 “Table of Critical Values of ” to make the decision. The idea is that any F ratio greater than the critical value has a p value of less than .05. Thus if the F ratio we compute is beyond the critical value, then we reject the null hypothesis. If the F ratio we compute is less than the critical value, then we retain the null hypothesis.
2 | 3 | 4 | |
---|---|---|---|
8 | 4.459 | 4.066 | 3.838 |
9 | 4.256 | 3.863 | 3.633 |
10 | 4.103 | 3.708 | 3.478 |
11 | 3.982 | 3.587 | 3.357 |
12 | 3.885 | 3.490 | 3.259 |
13 | 3.806 | 3.411 | 3.179 |
14 | 3.739 | 3.344 | 3.112 |
15 | 3.682 | 3.287 | 3.056 |
16 | 3.634 | 3.239 | 3.007 |
17 | 3.592 | 3.197 | 2.965 |
18 | 3.555 | 3.160 | 2.928 |
19 | 3.522 | 3.127 | 2.895 |
20 | 3.493 | 3.098 | 2.866 |
21 | 3.467 | 3.072 | 2.840 |
22 | 3.443 | 3.049 | 2.817 |
23 | 3.422 | 3.028 | 2.796 |
24 | 3.403 | 3.009 | 2.776 |
25 | 3.385 | 2.991 | 2.759 |
30 | 3.316 | 2.922 | 2.690 |
35 | 3.267 | 2.874 | 2.641 |
40 | 3.232 | 2.839 | 2.606 |
45 | 3.204 | 2.812 | 2.579 |
50 | 3.183 | 2.790 | 2.557 |
55 | 3.165 | 2.773 | 2.540 |
60 | 3.150 | 2.758 | 2.525 |
65 | 3.138 | 2.746 | 2.513 |
70 | 3.128 | 2.736 | 2.503 |
75 | 3.119 | 2.727 | 2.494 |
80 | 3.111 | 2.719 | 2.486 |
85 | 3.104 | 2.712 | 2.479 |
90 | 3.098 | 2.706 | 2.473 |
95 | 3.092 | 2.700 | 2.467 |
100 | 3.087 | 2.696 | 2.463 |
Example One-Way ANOVA
Imagine that the health psychologist wants to compare the calorie estimates of psychology majors, nutrition majors, and professional dieticians. He collects the following data:
Psych majors: 200, 180, 220, 160, 150, 200, 190, 200
Nutrition majors: 190, 220, 200, 230, 160, 150, 200, 210, 195
Dieticians: 220, 250, 240, 275, 250, 230, 200, 240
The means are 187.50 ( SD = 23.14), 195.00 ( SD = 27.77), and 238.13 ( SD = 22.35), respectively. So it appears that dieticians made substantially more accurate estimates on average. The researcher would almost certainly enter these data into a program such as Excel or SPSS, which would compute F for him and find the p value. Table 13.4 shows the output of the one-way ANOVA function in Excel for these data. This table is referred to as an ANOVA table. It shows that MS B is 5,971.88, MS W is 602.23, and their ratio, F , is 9.92. The p value is .0009. Because this value is below .05, the researcher would reject the null hypothesis and conclude that the mean calorie estimates for the three groups are not the same in the population. Notice that the ANOVA table also includes the “sum of squares” ( SS ) for between groups and for within groups. These values are computed on the way to finding MS B and MS W but are not typically reported by the researcher. Finally, if the researcher were to compute the F ratio by hand, he could look at Table 13.3 and see that the critical value of F with 2 and 21 degrees of freedom is 3.467 (the same value in Table 13.4 under F crit ). The fact that his F score was more extreme than this critical value would tell him that his p value is less than .05 and that he should reject the null hypothesis.
Between groups | 11,943.75 | 2 | 5,971.875 | 9.916234 | 0.000928 | 3.4668 |
Within groups | 12,646.88 | 21 | 602.2321 | |||
Total | 24,590.63 | 23 |
ANOVA Elaborations
Post hoc comparisons.
When we reject the null hypothesis in a one-way ANOVA, we conclude that the group means are not all the same in the population. But this can indicate different things. With three groups, it can indicate that all three means are significantly different from each other. Or it can indicate that one of the means is significantly different from the other two, but the other two are not significantly different from each other. It could be, for example, that the mean calorie estimates of psychology majors, nutrition majors, and dieticians are all significantly different from each other. Or it could be that the mean for dieticians is significantly different from the means for psychology and nutrition majors, but the means for psychology and nutrition majors are not significantly different from each other. For this reason, statistically significant one-way ANOVA results are typically followed up with a series of post hoc comparisons of selected pairs of group means to determine which are different from which others.
One approach to post hoc comparisons would be to conduct a series of independent-samples t tests comparing each group mean to each of the other group means. But there is a problem with this approach. In general, if we conduct a t test when the null hypothesis is true, we have a 5% chance of mistakenly rejecting the null hypothesis (see Section 13.3 “Additional Considerations” for more on such Type I errors). If we conduct several t tests when the null hypothesis is true, the chance of mistakenly rejecting at least one null hypothesis increases with each test we conduct. Thus researchers do not usually make post hoc comparisons using standard t tests because there is too great a chance that they will mistakenly reject at least one null hypothesis. Instead, they use one of several modified t test procedures—among them the Bonferonni procedure, Fisher’s least significant difference (LSD) test, and Tukey’s honestly significant difference (HSD) test. The details of these approaches are beyond the scope of this book, but it is important to understand their purpose. It is to keep the risk of mistakenly rejecting a true null hypothesis to an acceptable level (close to 5%).
Repeated-Measures ANOVA
Recall that the one-way ANOVA is appropriate for between-subjects designs in which the means being compared come from separate groups of participants. It is not appropriate for within-subjects designs in which the means being compared come from the same participants tested under different conditions or at different times. This requires a slightly different approach, called the repeated-measures ANOVA . The basics of the repeated-measures ANOVA are the same as for the one-way ANOVA. The main difference is that measuring the dependent variable multiple times for each participant allows for a more refined measure of MS W . Imagine, for example, that the dependent variable in a study is a measure of reaction time. Some participants will be faster or slower than others because of stable individual differences in their nervous systems, muscles, and other factors. In a between-subjects design, these stable individual differences would simply add to the variability within the groups and increase the value of MS W . In a within-subjects design, however, these stable individual differences can be measured and subtracted from the value of MS W . This lower value of MS W means a higher value of F and a more sensitive test.
Factorial ANOVA
When more than one independent variable is included in a factorial design, the appropriate approach is the factorial ANOVA . Again, the basics of the factorial ANOVA are the same as for the one-way and repeated-measures ANOVAs. The main difference is that it produces an F ratio and p value for each main effect and for each interaction. Returning to our calorie estimation example, imagine that the health psychologist tests the effect of participant major (psychology vs. nutrition) and food type (cookie vs. hamburger) in a factorial design. A factorial ANOVA would produce separate F ratios and p values for the main effect of major, the main effect of food type, and the interaction between major and food. Appropriate modifications must be made depending on whether the design is between subjects, within subjects, or mixed.
Testing Pearson’s r
For relationships between quantitative variables, where Pearson’s r is used to describe the strength of those relationships, the appropriate null hypothesis test is a test of Pearson’s r . The basic logic is exactly the same as for other null hypothesis tests. In this case, the null hypothesis is that there is no relationship in the population. We can use the Greek lowercase rho (ρ) to represent the relevant parameter: ρ = 0. The alternative hypothesis is that there is a relationship in the population: ρ ≠ 0. As with the t test, this test can be two-tailed if the researcher has no expectation about the direction of the relationship or one-tailed if the researcher expects the relationship to go in a particular direction.
It is possible to use Pearson’s r for the sample to compute a t score with N − 2 degrees of freedom and then to proceed as for a t test. However, because of the way it is computed, Pearson’s r can also be treated as its own test statistic. The online statistical tools and statistical software such as Excel and SPSS generally compute Pearson’s r and provide the p value associated with that value of Pearson’s r . As always, if the p value is less than .05, we reject the null hypothesis and conclude that there is a relationship between the variables in the population. If the p value is greater than .05, we retain the null hypothesis and conclude that there is not enough evidence to say there is a relationship in the population. If we compute Pearson’s r by hand, we can use a table like Table 13.5, which shows the critical values of r for various samples sizes when α is .05. A sample value of Pearson’s r that is more extreme than the critical value is statistically significant.
Critical value of one-tailed | Critical value of two-tailed | |
---|---|---|
5 | .805 | .878 |
10 | .549 | .632 |
15 | .441 | .514 |
20 | .378 | .444 |
25 | .337 | .396 |
30 | .306 | .361 |
35 | .283 | .334 |
40 | .264 | .312 |
45 | .248 | .294 |
50 | .235 | .279 |
55 | .224 | .266 |
60 | .214 | .254 |
65 | .206 | .244 |
70 | .198 | .235 |
75 | .191 | .227 |
80 | .185 | .220 |
85 | .180 | .213 |
90 | .174 | .207 |
95 | .170 | .202 |
100 | .165 | .197 |
Example Test of Pearson’s r
Imagine that the health psychologist is interested in the correlation between people’s calorie estimates and their weight. He has no expectation about the direction of the relationship, so he decides to conduct a two-tailed test. He computes the correlation for a sample of 22 university students and finds that Pearson’s r is −.21. The statistical software he uses tells him that the p value is .348. It is greater than .05, so he retains the null hypothesis and concludes that there is no relationship between people’s calorie estimates and their weight. If he were to compute Pearson’s r by hand, he could look at Table 13.5 and see that the critical value for 22 − 2 = 20 degrees of freedom is .444. The fact that Pearson’s r for the sample is less extreme than this critical value tells him that the p value is greater than .05 and that he should retain the null hypothesis.
Key Takeaways
- To compare two means, the most common null hypothesis test is the t test. The one-sample t test is used for comparing one sample mean with a hypothetical population mean of interest, the dependent-samples t test is used to compare two means in a within-subjects design, and the independent-samples t test is used to compare two means in a between-subjects design.
- To compare more than two means, the most common null hypothesis test is the analysis of variance (ANOVA). The one-way ANOVA is used for between-subjects designs with one independent variable, the repeated-measures ANOVA is used for within-subjects designs, and the factorial ANOVA is used for factorial designs.
- A null hypothesis test of Pearson’s r is used to compare a sample value of Pearson’s r with a hypothetical population value of 0.
- Practice: Use one of the online tools, Excel, or SPSS to reproduce the one-sample t test, dependent-samples t test, independent-samples t test, and one-way ANOVA for the four sets of calorie estimation data presented in this section.
- Practice: A sample of 25 university students rated their friendliness on a scale of 1 ( Much Lower Than Average ) to 7 ( Much Higher Than Average ). Their mean rating was 5.30 with a standard deviation of 1.50. Conduct a one-sample t test comparing their mean rating with a hypothetical mean rating of 4 ( Average ). The question is whether university students have a tendency to rate themselves as friendlier than average.
- The correlation between height and IQ is +.13 in a sample of 35.
- For a sample of 88 university students, the correlation between how disgusted they felt and the harshness of their moral judgments was +.23.
- The correlation between the number of daily hassles and positive mood is −.43 for a sample of 30 middle-aged adults.
A common null hypothesis test examining the difference between two means.
Compares a sample mean with a hypothetical population mean that provides some interesting standard of comparison.
A statistic that is computed only to help find the p value.
Points on the test distribution that are compared to the test statistic to determine whether to reject the null hypothesis.
The null hypothesis is rejected if the t score for the sample is extreme in either direction.
Where the null hypothesis is rejected only if the t score for the sample is extreme in one direction that we specify before collecting the data.
Statistical test used to compare two means for the same sample tested at two different times or under two different conditions.
Variable formed by subtracting one variable from another.
Statistical test used to compare the means of two separate samples.
Most common null hypothesis test when there are more than two groups or condition means to be compared.
A null hypothesis test that is used for between-between subjects designs with a single independent variable.
An estimate of population variance based on the differences among the sample means.
An estimate of population variance based on the differences among the scores within each group.
Analysis of selected pairs of group means to determine which are different from which others.
The dependent variable is measured multiple times for each participant, allowing a more refined measure of MSW.
A null hypothesis test that is used when more than one independent variable is included in a factorial design.
Research Methods in Psychology - 2nd Canadian Edition Copyright © 2015 by Paul C. Price, Rajiv Jhangiani, & I-Chant A. Chiang is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License , except where otherwise noted.
Share This Book
- Flashes Safe Seven
- FlashLine Login
- Faculty & Staff Phone Directory
- Emeriti or Retiree
- All Departments
- Maps & Directions
![Kent State University Kent State University Home](https://www-s3-live.kent.edu/s3fs-root/s3fs-public/kent_state_university%20Horizontal_124-White-cpm.png)
- Building Guide
- Departments
- Directions & Parking
- Faculty & Staff
- Give to University Libraries
- Library Instructional Spaces
- Mission & Vision
- Newsletters
- Circulation
- Course Reserves / Core Textbooks
- Equipment for Checkout
- Interlibrary Loan
- Library Instruction
- Library Tutorials
- My Library Account
- Open Access Kent State
- Research Support Services
- Statistical Consulting
- Student Multimedia Studio
- Citation Tools
- Databases A-to-Z
- Databases By Subject
- Digital Collections
- Discovery@Kent State
- Government Information
- Journal Finder
- Library Guides
- Connect from Off-Campus
- Library Workshops
- Subject Librarians Directory
- Suggestions/Feedback
- Writing Commons
- Academic Integrity
- Jobs for Students
- International Students
- Meet with a Librarian
- Study Spaces
- University Libraries Student Scholarship
- Affordable Course Materials
- Copyright Services
- Selection Manager
- Suggest a Purchase
Library Locations at the Kent Campus
- Architecture Library
- Fashion Library
- Map Library
- Performing Arts Library
- Special Collections and Archives
Regional Campus Libraries
- East Liverpool
- College of Podiatric Medicine
![null hypothesis spss null hypothesis spss](https://d10zm727sx51r.cloudfront.net/sites/all/themes/ksu_library_zurb/images/icon_hours.png)
- Kent State University
- SPSS Tutorials
Chi-Square Test of Independence
Spss tutorials: chi-square test of independence.
- The SPSS Environment
- The Data View Window
- Using SPSS Syntax
- Data Creation in SPSS
- Importing Data into SPSS
- Variable Types
- Date-Time Variables in SPSS
- Defining Variables
- Creating a Codebook
- Computing Variables
- Computing Variables: Mean Centering
- Computing Variables: Recoding Categorical Variables
- Computing Variables: Recoding String Variables into Coded Categories (Automatic Recode)
- rank transform converts a set of data values by ordering them from smallest to largest, and then assigning a rank to each value. In SPSS, the Rank Cases procedure can be used to compute the rank transform of a variable." href="https://libguides.library.kent.edu/SPSS/RankCases" style="" >Computing Variables: Rank Transforms (Rank Cases)
- Weighting Cases
- Sorting Data
- Grouping Data
- Descriptive Stats for One Numeric Variable (Explore)
- Descriptive Stats for One Numeric Variable (Frequencies)
- Descriptive Stats for Many Numeric Variables (Descriptives)
- Descriptive Stats by Group (Compare Means)
- Frequency Tables
- Working with "Check All That Apply" Survey Data (Multiple Response Sets)
- Pearson Correlation
- One Sample t Test
- Paired Samples t Test
- Independent Samples t Test
- One-Way ANOVA
- How to Cite the Tutorials
Sample Data Files
Our tutorials reference a dataset called "sample" in many examples. If you'd like to download the sample dataset to work through the examples, choose one of the files below:
- Data definitions (*.pdf)
- Data - Comma delimited (*.csv)
- Data - Tab delimited (*.txt)
- Data - Excel format (*.xlsx)
- Data - SAS format (*.sas7bdat)
- Data - SPSS format (*.sav)
- SPSS Syntax (*.sps) Syntax to add variable labels, value labels, set variable types, and compute several recoded variables used in later tutorials.
- SAS Syntax (*.sas) Syntax to read the CSV-format sample data and set variable labels and formats/value labels.
The Chi-Square Test of Independence determines whether there is an association between categorical variables (i.e., whether the variables are independent or related). It is a nonparametric test.
This test is also known as:
- Chi-Square Test of Association.
This test utilizes a contingency table to analyze the data. A contingency table (also known as a cross-tabulation , crosstab , or two-way table ) is an arrangement in which data is classified according to two categorical variables. The categories for one variable appear in the rows, and the categories for the other variable appear in columns. Each variable must have two or more categories. Each cell reflects the total count of cases for a specific pair of categories.
There are several tests that go by the name "chi-square test" in addition to the Chi-Square Test of Independence. Look for context clues in the data and research question to make sure what form of the chi-square test is being used.
Common Uses
The Chi-Square Test of Independence is commonly used to test the following:
- Statistical independence or association between two categorical variables.
The Chi-Square Test of Independence can only compare categorical variables. It cannot make comparisons between continuous variables or between categorical and continuous variables. Additionally, the Chi-Square Test of Independence only assesses associations between categorical variables, and can not provide any inferences about causation.
If your categorical variables represent "pre-test" and "post-test" observations, then the chi-square test of independence is not appropriate . This is because the assumption of the independence of observations is violated. In this situation, McNemar's Test is appropriate.
Data Requirements
Your data must meet the following requirements:
- Two categorical variables.
- Two or more categories (groups) for each variable.
- There is no relationship between the subjects in each group.
- The categorical variables are not "paired" in any way (e.g. pre-test/post-test observations).
- Expected frequencies for each cell are at least 1.
- Expected frequencies should be at least 5 for the majority (80%) of the cells.
The null hypothesis ( H 0 ) and alternative hypothesis ( H 1 ) of the Chi-Square Test of Independence can be expressed in two different but equivalent ways:
H 0 : "[ Variable 1 ] is independent of [ Variable 2 ]" H 1 : "[ Variable 1 ] is not independent of [ Variable 2 ]"
H 0 : "[ Variable 1 ] is not associated with [ Variable 2 ]" H 1 : "[ Variable 1 ] is associated with [ Variable 2 ]"
Test Statistic
The test statistic for the Chi-Square Test of Independence is denoted Χ 2 , and is computed as:
$$ \chi^{2} = \sum_{i=1}^{R}{\sum_{j=1}^{C}{\frac{(o_{ij} - e_{ij})^{2}}{e_{ij}}}} $$
\(o_{ij}\) is the observed cell count in the i th row and j th column of the table
\(e_{ij}\) is the expected cell count in the i th row and j th column of the table, computed as
$$ e_{ij} = \frac{\mathrm{ \textrm{row } \mathit{i}} \textrm{ total} * \mathrm{\textrm{col } \mathit{j}} \textrm{ total}}{\textrm{grand total}} $$
The quantity ( o ij - e ij ) is sometimes referred to as the residual of cell ( i , j ), denoted \(r_{ij}\).
The calculated Χ 2 value is then compared to the critical value from the Χ 2 distribution table with degrees of freedom df = ( R - 1)( C - 1) and chosen confidence level. If the calculated Χ 2 value > critical Χ 2 value, then we reject the null hypothesis.
Data Set-Up
There are two different ways in which your data may be set up initially. The format of the data will determine how to proceed with running the Chi-Square Test of Independence. At minimum, your data should include two categorical variables (represented in columns) that will be used in the analysis. The categorical variables must include at least two groups. Your data may be formatted in either of the following ways:
If you have the raw data (each row is a subject):
![null hypothesis spss Example of a dataset structure where each row represents a case or subject. Screenshot shows a Data View window with cases 1-5 and 430-435 from the sample dataset, and columns ids, Smoking and Gender.](https://s3.amazonaws.com/libapps/accounts/2515/images/spss_crosstabs_data-set-up_example_cases-are-rows.png)
- Cases represent subjects, and each subject appears once in the dataset. That is, each row represents an observation from a unique subject.
- The dataset contains at least two nominal categorical variables (string or numeric). The categorical variables used in the test must have two or more categories.
If you have frequencies (each row is a combination of factors):
An example of using the chi-square test for this type of data can be found in the Weighting Cases tutorial .
![null hypothesis spss Example of a dataset structure where each row represents a frequency. Screenshot shows a Data View window with three columns (ClassRank, PickedAMajor, and Freq) and six rows.](https://lgimages.s3.amazonaws.com/data/imagemanager/68594/spss_weightcases_freqdata_opt.png)
- Each row in the dataset represents a distinct combination of the categories.
- The value in the "frequency" column for a given row is the number of unique subjects with that combination of categories.
- You should have three variables: one representing each category, and a third representing the number of occurrences of that particular combination of factors.
- Before running the test, you must activate Weight Cases, and set the frequency variable as the weight.
Run a Chi-Square Test of Independence
In SPSS, the Chi-Square Test of Independence is an option within the Crosstabs procedure. Recall that the Crosstabs procedure creates a contingency table or two-way table , which summarizes the distribution of two categorical variables.
To create a crosstab and perform a chi-square test of independence, click Analyze > Descriptive Statistics > Crosstabs .
![null hypothesis spss](https://libapps.s3.amazonaws.com/accounts/2515/images/spss_v25_crosstabs_dialog-window_labeled_windows-10.png)
A Row(s): One or more variables to use in the rows of the crosstab(s). You must enter at least one Row variable.
B Column(s): One or more variables to use in the columns of the crosstab(s). You must enter at least one Column variable.
Also note that if you specify one row variable and two or more column variables, SPSS will print crosstabs for each pairing of the row variable with the column variables. The same is true if you have one column variable and two or more row variables, or if you have multiple row and column variables. A chi-square test will be produced for each table. Additionally, if you include a layer variable, chi-square tests will be run for each pair of row and column variables within each level of the layer variable.
C Layer: An optional "stratification" variable. If you have turned on the chi-square test results and have specified a layer variable, SPSS will subset the data with respect to the categories of the layer variable, then run chi-square tests between the row and column variables. (This is not equivalent to testing for a three-way association, or testing for an association between the row and column variable after controlling for the layer variable.)
D Statistics: Opens the Crosstabs: Statistics window, which contains fifteen different inferential statistics for comparing categorical variables.
![null hypothesis spss In the Crosstabs: Statistics window, check the box next to Chi-square.](https://libapps.s3.amazonaws.com/accounts/2515/images/spss_v25_crosstabs_dialog-window_statistics_windows-10.png)
To run the Chi-Square Test of Independence, make sure that the Chi-square box is checked.
E Cells: Opens the Crosstabs: Cell Display window, which controls which output is displayed in each cell of the crosstab. (Note: in a crosstab, the cells are the inner sections of the table. They show the number of observations for a given combination of the row and column categories.) There are three options in this window that are useful (but optional) when performing a Chi-Square Test of Independence:
![null hypothesis spss](https://libapps.s3.amazonaws.com/accounts/2515/images/spss_v25_crosstabs-chi-square_cell-display_dialog-window_labeled_windows-10.png)
1 Observed : The actual number of observations for a given cell. This option is enabled by default.
2 Expected : The expected number of observations for that cell (see the test statistic formula).
3 Unstandardized Residuals : The "residual" value, computed as observed minus expected.
F Format: Opens the Crosstabs: Table Format window, which specifies how the rows of the table are sorted.
![null hypothesis spss null hypothesis spss](https://libapps.s3.amazonaws.com/accounts/2515/images/spss_v25_crosstabs_dialog-window_table-format_windows-10.png)
Example: Chi-square Test for 3x2 Table
Problem statement.
In the sample dataset, respondents were asked their gender and whether or not they were a cigarette smoker. There were three answer choices: Nonsmoker, Past smoker, and Current smoker. Suppose we want to test for an association between smoking behavior (nonsmoker, current smoker, or past smoker) and gender (male or female) using a Chi-Square Test of Independence (we'll use α = 0.05).
Before the Test
Before we test for "association", it is helpful to understand what an "association" and a "lack of association" between two categorical variables looks like. One way to visualize this is using clustered bar charts. Let's look at the clustered bar chart produced by the Crosstabs procedure.
This is the chart that is produced if you use Smoking as the row variable and Gender as the column variable (running the syntax later in this example):
The "clusters" in a clustered bar chart are determined by the row variable (in this case, the smoking categories). The color of the bars is determined by the column variable (in this case, gender). The height of each bar represents the total number of observations in that particular combination of categories.
This type of chart emphasizes the differences within the categories of the row variable. Notice how within each smoking category, the heights of the bars (i.e., the number of males and females) are very similar. That is, there are an approximately equal number of male and female nonsmokers; approximately equal number of male and female past smokers; approximately equal number of male and female current smokers. If there were an association between gender and smoking, we would expect these counts to differ between groups in some way.
Running the Test
- Open the Crosstabs dialog ( Analyze > Descriptive Statistics > Crosstabs ).
- Select Smoking as the row variable, and Gender as the column variable.
- Click Statistics . Check Chi-square , then click Continue .
- (Optional) Check the box for Display clustered bar charts .
The first table is the Case Processing summary, which tells us the number of valid cases used for analysis. Only cases with nonmissing values for both smoking behavior and gender can be used in the test.
The next tables are the crosstabulation and chi-square test results.
The key result in the Chi-Square Tests table is the Pearson Chi-Square.
- The value of the test statistic is 3.171.
- The footnote for this statistic pertains to the expected cell count assumption (i.e., expected cell counts are all greater than 5): no cells had an expected count less than 5, so this assumption was met.
- Because the test statistic is based on a 3x2 crosstabulation table, the degrees of freedom (df) for the test statistic is $$ df = (R - 1)*(C - 1) = (3 - 1)*(2 - 1) = 2*1 = 2 $$.
- The corresponding p-value of the test statistic is p = 0.205.
Decision and Conclusions
Since the p-value is greater than our chosen significance level ( α = 0.05), we do not reject the null hypothesis. Rather, we conclude that there is not enough evidence to suggest an association between gender and smoking.
Based on the results, we can state the following:
- No association was found between gender and smoking behavior ( Χ 2 (2)> = 3.171, p = 0.205).
Example: Chi-square Test for 2x2 Table
Let's continue the row and column percentage example from the Crosstabs tutorial, which described the relationship between the variables RankUpperUnder (upperclassman/underclassman) and LivesOnCampus (lives on campus/lives off-campus). Recall that the column percentages of the crosstab appeared to indicate that upperclassmen were less likely than underclassmen to live on campus:
- The proportion of underclassmen who live off campus is 34.8%, or 79/227.
- The proportion of underclassmen who live on campus is 65.2%, or 148/227.
- The proportion of upperclassmen who live off campus is 94.4%, or 152/161.
- The proportion of upperclassmen who live on campus is 5.6%, or 9/161.
Suppose that we want to test the association between class rank and living on campus using a Chi-Square Test of Independence (using α = 0.05).
The clustered bar chart from the Crosstabs procedure can act as a complement to the column percentages above. Let's look at the chart produced by the Crosstabs procedure for this example:
The height of each bar represents the total number of observations in that particular combination of categories. The "clusters" are formed by the row variable (in this case, class rank). This type of chart emphasizes the differences within the underclassmen and upperclassmen groups. Here, the differences in number of students living on campus versus living off-campus is much starker within the class rank groups.
- Select RankUpperUnder as the row variable, and LiveOnCampus as the column variable.
- (Optional) Click Cells . Under Counts, check the boxes for Observed and Expected , and under Residuals, click Unstandardized . Then click Continue .
The first table is the Case Processing summary, which tells us the number of valid cases used for analysis. Only cases with nonmissing values for both class rank and living on campus can be used in the test.
The next table is the crosstabulation. If you elected to check off the boxes for Observed Count, Expected Count, and Unstandardized Residuals, you should see the following table:
With the Expected Count values shown, we can confirm that all cells have an expected value greater than 5.
Off-Campus | On-Campus | Total | |
---|---|---|---|
Underclassman | Row 1, column 1 $$ o_{\mathrm{11}} = 79 $$ $$ e_{\mathrm{11}} = \frac{227*231}{388} = 135.147 $$ $$ r_{\mathrm{11}} = 79 - 135.147 = -56.147 $$ | Row 1, column 2 $$ o_{\mathrm{12}} = 148 $$ $$ e_{\mathrm{12}} = \frac{227*157}{388} = 91.853 $$ $$ r_{\mathrm{12}} = 148 - 91.853 = 56.147 $$ | row 1 total = 227 |
Upperclassmen | Row 2, column 1 $$ o_{\mathrm{21}} = 152 $$ $$ e_{\mathrm{21}} = \frac{161*231}{388} = 95.853 $$ $$ r_{\mathrm{21}} = 152 - 95.853 = 56.147 $$ | Row 2, column 2 $$ o_{\mathrm{22}} = 9 $$ $$ e_{\mathrm{22}} = \frac{161*157}{388} = 65.147 $$ $$ r_{\mathrm{22}} = 9 - 65.147 = -56.147 $$ | row 2 total = 161 |
Total | col 1 total = 231 | col 2 total = 157 | grand total = 388 |
These numbers can be plugged into the chi-square test statistic formula:
$$ \chi^{2} = \sum_{i=1}^{R}{\sum_{j=1}^{C}{\frac{(o_{ij} - e_{ij})^{2}}{e_{ij}}}} = \frac{(-56.147)^{2}}{135.147} + \frac{(56.147)^{2}}{91.853} + \frac{(56.147)^{2}}{95.853} + \frac{(-56.147)^{2}}{65.147} = 138.926 $$
We can confirm this computation with the results in the Chi-Square Tests table:
The row of interest here is Pearson Chi-Square and its footnote.
- The value of the test statistic is 138.926.
- Because the crosstabulation is a 2x2 table, the degrees of freedom (df) for the test statistic is $$ df = (R - 1)*(C - 1) = (2 - 1)*(2 - 1) = 1 $$.
- The corresponding p-value of the test statistic is so small that it is cut off from display. Instead of writing "p = 0.000", we instead write the mathematically correct statement p < 0.001.
Since the p-value is less than our chosen significance level α = 0.05, we can reject the null hypothesis, and conclude that there is an association between class rank and whether or not students live on-campus.
- There was a significant association between class rank and living on campus ( Χ 2 (1) = 138.9, p < .001).
- << Previous: Analyzing Data
- Next: Pearson Correlation >>
- Last Updated: Jul 10, 2024 11:08 AM
- URL: https://libguides.library.kent.edu/SPSS
Street Address
Mailing address, quick links.
- How Are We Doing?
- Student Jobs
Information
- Accessibility
- Emergency Information
- For Our Alumni
- For the Media
- Jobs & Employment
- Life at KSU
- Privacy Statement
- Technology Support
- Website Feedback
![](http://ustaliy.fun/777/templates/cheerup/res/banner1.gif)
IMAGES
COMMENTS
By Ruben Geert van den Berg under Statistics A-Z. A null hypothesis is a precise statement about a population that we try to reject with sample data. We don't usually believe our null hypothesis (or H 0) to be true. However, we need some exact statement as a starting point for statistical significance testing.
The null hypothesis (H 0) and (two-tailed) alternative hypothesis ... To run a One Sample t Test in SPSS, click Analyze > Compare Means > One-Sample T Test. The One-Sample T Test window opens where you will specify the variables to be used in the analysis. All of the variables in your dataset appear in the list on the left side.
This video demonstrates how to test the null hypothesis with ANOVA in SPSS. In the case of ANOVA, the null hypothesis states the mean score for each group is...
The null hypothesis (H 0) and alternative hypothesis (H 1) of the Independent Samples t Test can be expressed in two different but equivalent ways: ... SPSS conveniently includes a test for the homogeneity of variance, called Levene's Test, whenever you run an independent samples t test.
If you cannot specify the null hypothesis, SPSS uses the nil hypothesis that the population value of interest is zero. For example, SPSS tests the null hypothesis that males and females have the same average willingness to donate to a charity, that is, the mean difference is zero, if we apply an independent samples t test.
The single sample t-test tests the null hypothesis that the population mean is equal to the number specified by the user. SPSS calculates the t-statistic and its p-value under the assumption that the sample comes from an approximately normal distribution. If the p-value associated with the t-test is small (0.05 is often used as the threshold ...
General Statistics and Hypothesis Testing; Graphics; Further Resources; Merging Files based on a shared variable. This section and the "Graphics" section provide a quick tutorial for a few common functions in SPSS, primarily to provide the reader with a feel for the SPSS user interface. This is not a comprehensive tutorial, but SPSS itself ...
Null Hypothesis H 0: The correlation in the population is zero: ρ = 0. Alternative Hypothesis H A: The correlation in the population is not zero: ρ ≠ 0. For all these cases, the analysts define the hypotheses before the study. After collecting the data, they perform a hypothesis test to determine whether they can reject the null hypothesis.
As a rule of thumb, we reject the null hypothesis if p < 0.05. We just found that p = 0.73 so we don't reject our null hypothesis: given our sample data, the population mean being 100 is a credible statement. So precisely what does p = 0.73 mean? Well, it means there's a 0.73 (or 73%) probability that t < -0.35 or t > 0.35.
Null Hypothesis. Generally, the null hypothesis for a paired samples t-test is that 2 variables have equal population means. Now, we don't have data on the entire student population. ... SPSS reports the mean and standard deviation of the difference scores for each pair of variables. The mean is the difference between the sample means.
Created by the ITS Training Program at CSULA for students. Hypothesis Testing: SPSS (2.1): The null hypothesis (H0) represents a theory that has been presented, either because it is believed to be true or because it is to be used as a basis for an argument. It is a statement that has not been proven. It is also important to realize that t….
The actual test begins by considering two hypotheses.They are called the null hypothesis and the alternative hypothesis.These hypotheses contain opposing viewpoints. \(H_0\): The null hypothesis: It is a statement of no difference between the variables—they are not related. This can often be considered the status quo and as a result if you cannot accept the null it requires some action.
H 0 (Null Hypothesis): Population parameter =, ≤, ≥ some value. H A (Alternative Hypothesis): Population parameter <, >, ≠ some value. Note that the null hypothesis always contains the equal sign. We interpret the hypotheses as follows: Null hypothesis: The sample data provides no evidence to support some claim being made by an individual.
SPSS & Hypothesis Testing. Hypothesis testing is a decision making process for evaluating claims about a population. Q1: Give at least three examples of a population. Q2: For the population listed in 1), give an example of a sample from the population. Q3: Can you make up some hypothesis about the population in 1).
Null hypothesis (H 0): Independent variable does not affect dependent variable. Alternative hypothesis (H a): Independent variable affects dependent variable. Test-specific template sentences. Once you know the statistical test you'll be using, you can write your hypotheses in a more precise and mathematical way specific to the test you chose ...
Let's return finally to the question of whether we reject or fail to reject the null hypothesis. If our statistical analysis shows that the significance level is below the cut-off value we have set (e.g., either 0.05 or 0.01), we reject the null hypothesis and accept the alternative hypothesis. Alternatively, if the significance level is above ...
The purpose of the test is to determine whether there is statistical evidence that the mean difference between paired observations is significantly different from zero. The Paired Samples t Test is a parametric test. This test is also known as: Dependent t Test. Paired t Test. Repeated Measures t Test. The variable used in this test is known as ...
Therefore, we can reject the null hypothesis and accept the alternative hypothesis. Practical vs. statistical significance Although a statistically significant difference was found between the depression scores in the recruited subjects vs. the normal depression score, it does not necessarily mean that the difference encountered, 0.28 (95% CI ...
xi: The value of the predictor variable xi. Multiple linear regression uses the following null and alternative hypotheses: H0: β1 = β2 = … = βk = 0. HA: β1 = β2 = … = βk ≠ 0. The null hypothesis states that all coefficients in the model are equal to zero. In other words, none of the predictor variables have a statistically ...
The most common null hypothesis test for this type of statistical relationship is the t test. In this section, we look at three types of t tests that are used for slightly different research designs: the one-sample t test, the dependent-samples t test, and the independent-samples t test. The one-sample t test is used to compare a sample mean ...
If the p-value that results from the test is less than your chosen significance level (e.g. 0.05) then you can reject the null hypothesis and conclude that the data is not normally distributed. To perform a Shapiro-Wilk test in SPSS, you can use Analyze > Descriptive Statistics > Explore. The following example shows how to perform this test in ...
The null hypothesis (H 0) and alternative hypothesis (H 1) of the Chi-Square Test of Independence can be expressed in two different but equivalent ways: H 0: "[Variable 1] is independent of [Variable 2]" ... In SPSS, the Chi-Square Test of Independence is an option within the Crosstabs procedure.
Which of the following is the best conclusion to be drawn from these results?The null hypothesis was not rejected, but this doesnt necessarily indicate that people prefer the three variations equally.The null hypothesis was rejected, meaning that variation 2 is preferred above the other two variations.The null hypothesis was rejected, suggesting there are differences in how people prefer ...