Stats Bites: Hypothesis Testing

[et_pb_section fb_built=”1″ admin_label=”Section” _builder_version=”4.0.11″ custom_padding=”10px||0px|||” locked=”off”][et_pb_row column_structure=”2_3,1_3″ _builder_version=”4.0.11″ width=”100%” custom_margin=”-25px|auto||auto||”][et_pb_column type=”2_3″ _builder_version=”4.0.11″][et_pb_text admin_label=”Bio” _builder_version=”4.0.11″]

In this bite you will learn about the process of testing hypotheses, how to form a scientific hypothesis and the meaning of p-values, significance levels and effect sizes.

 

[/et_pb_text][/et_pb_column][et_pb_column type=”1_3″ _builder_version=”4.0.11″][et_pb_image src=”https://learningspaces.dundee.ac.uk/ctil/files/2016/03/icon_hypothesis_testing.png” align=”center” admin_label=”Icon” _builder_version=”4.0.11″ width=”65%”][/et_pb_image][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section fb_built=”1″ admin_label=”S1″ _builder_version=”4.0.11″ min_height=”507px” custom_margin=”-8px|||||” custom_padding=”7px|||||” locked=”off”][et_pb_row _builder_version=”4.0.11″ width=”100%” custom_margin=”6px|auto|18px|auto||” custom_padding=”||9px|||”][et_pb_column type=”4_4″ _builder_version=”4.0.11″][et_pb_text admin_label=”What is hypothesis testing?” _builder_version=”4.0.11″]

What is hypothesis testing?

Hypothesis testing is a way of using inferential statistics to make inferences, claims or conclusions about a population based on a representative sample. Conducting an experiment, observation, survey— or whatever your study’s design— would be extremely costly and near impossible for that matter, if we were to sample the entire population of interest. Instead, we draw a sample of the population in focus and test hypothesis to allow us to generalize our findings to the population from which the sample was drawn.

Below shows the three steps involved in the process of hypotheses testing.

[/et_pb_text][et_pb_image src=”https://learningspaces.dundee.ac.uk/ctil/files/2016/03/hypotheses-testing-diagram-ipad.jpeg” admin_label=”Process of hypothesis testing” _builder_version=”4.0.11″][/et_pb_image][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section fb_built=”1″ admin_label=”S2″ _builder_version=”4.0.11″ custom_padding=”0px||7px|||” locked=”off”][et_pb_row _builder_version=”4.0.11″ width=”100%” custom_margin=”-19px|auto||auto||”][et_pb_column type=”4_4″ _builder_version=”4.0.11″][et_pb_text admin_label=”Stating null and alternative hypotheses” _builder_version=”4.0.11″]

Stating the null and alternative hypotheses

Hypotheses are educated guesses about the condition of the world around us. Hypotheses are statements which should be both testable and falsifiable in some way.

The first step in hypothesis testing is the formulation of the null hypothesis. The null hypothesis proposes there is no relationship, association or effect between the phenomena you are investigating. It is a statement about a parameter of the population (for example, the mean), that is assumed to be true. You can think about hypothesis testing a bit like ‘innocent until proven guilty’— we accept the status quo (the null hypothesis) until evidence strongly suggests otherwise. That is why, when carrying out hypothesis testing we seek to falsify the null hypothesis, which in turn, lets us accept the alternative hypothesis. The alternative hypothesis is what you think, as a researcher, actually explains the phenomena. It directly contradicts the claims of the null hypothesis. It is a statement that claims the actual value of a population parameter is less than, greater than or not equal to the value stated in the null hypothesis. Below is an example of a research question and appropriate null and alternative hypotheses constructed to test the predictions.

Say you were interested in the degree to which mindfulness impacts scores on an end of term statistical exam. You suspect that mindfulness will positively impact students grades so you construct hypotheses to test this;

Null hypothesis (H0): Practicing mindfulness will have no effect on test scores compared to not practicing mindfuless

Alternative hypothesis (H1): Practicing mindfulness will positively effect test scores compared to not practicing mindfulness

In order to test our hypothesis, we must first collect data. We collect a sample of students from the class and randomly assign them to one of two groups; practice mindfulness 1hr a week for the semester vs. do not practice mindfulness. Of course, we can’t conduct an experiment with all students in the world, so we draw a sample. Then we use this sample to make inferences about the population. This is the nature of hypothesis testing.

[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section fb_built=”1″ admin_label=”S3″ _builder_version=”4.0.11″ custom_padding=”3px||5px|||” locked=”off”][et_pb_row column_structure=”1_2,1_2″ _builder_version=”4.0.11″ width=”100%” custom_margin=”40px|auto||auto||” custom_padding=”||2px|||”][et_pb_column type=”1_2″ _builder_version=”4.0.11″][et_pb_text admin_label=”Significance levels and analysis” _builder_version=”4.0.11″ custom_padding=”||7px|||”]

Setting level of significance and performing statistical analysis

Now that our hypotheses have been constructed and we have gathered the relevant data, we need to set a criterion for reliably accepting that the null hypothesis is in fact not true, and that the alternative hypothesis is. Similar to providing evidence beyond reasonable doubt, the criterion lets you reject the null hypothesis and accept the alternative hypothesis with minimal error. 

[/et_pb_text][/et_pb_column][et_pb_column type=”1_2″ _builder_version=”4.0.11″][et_pb_video src=”http://www.youtube.com/watch?v=-MKT3yLDkqk” admin_label=”P-value video” _builder_version=”4.0.11″][/et_pb_video][/et_pb_column][/et_pb_row][et_pb_row _builder_version=”4.0.11″ width=”100%” custom_margin=”|auto|40px|auto||” custom_padding=”5px|||||”][et_pb_column type=”4_4″ _builder_version=”4.0.11″][et_pb_text admin_label=”analysis continued” _builder_version=”4.0.11″ custom_margin=”-4px|||||” custom_padding=”||0px|||”]

The criterion is usually set at <0.05, but is occasionally more stringently set at <0.01. The criterion tells you the probability (expressed through the p-value) of observing the results obtained in your sample assuming that the null hypothesis is true. With a criterion of <0.05 you are prepared to accept that 5% of the time (5 times in 100 or less) you will find a statistically significant difference/effect/relationship in your sample even if one does not exist in the population from which your sample was drawn [the null hypothesis is true]. Take a look at the following video for a good explanation of p-values. You can also take a look at this article which explains significance levels in a bit more depth.

[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section fb_built=”1″ admin_label=”S4″ _builder_version=”4.0.11″ custom_padding=”0px|||||” locked=”off”][et_pb_row _builder_version=”4.0.11″ width=”100%” custom_margin=”-4px|auto||auto||” custom_padding=”||39px|||”][et_pb_column type=”4_4″ _builder_version=”4.0.11″][et_pb_text admin_label=”Interpret p-value and draw conclusions” _builder_version=”4.0.11″ custom_padding=”||0px|||”]

Interpreting your p-value and drawing conclusions

Based on the analysis of our data it has been revealed that the mean exam score for those who practiced mindfulness was 81 whilst the mean score for those who did not was 63. This alone doesn’t answer our hypothesis, all it tells us is that in our sample those who practiced mindfulness did better in the exam than those who did not, but says nothing about the population. To make inferences about the population we need to refer to the p-value to determine whether we should accept or reject the null hypothesis and the alternative hypothesis. Remember, our p-value tells us the probability of observing the results obtained by chance alone and is an indication of the strength of our evidence. Let’s say we run a statistical test to test our hypotheses stated earlier and we obtain a p-value of 0.03. What does this tell us about our hypotheses? Well, this would mean there is a 3% chance of obtaining the results you did, if the null hypotheses were true. If we set our criterion at significance level <0.05, we would be able to reject the null hypothesis (that practicing mindfulness has no impact on stats exam performance) and accept the alternative hypothesis (that practicing mindfulness positively impacts stats exam performance). We can say that our results are statistically significant as they are below our set significance level.

[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section fb_built=”1″ admin_label=”S5″ _builder_version=”4.0.11″ custom_padding=”0px|||||” locked=”off”][et_pb_row column_structure=”1_2,1_2″ _builder_version=”4.0.11″ width=”100%”][et_pb_column type=”1_2″ _builder_version=”4.0.11″][et_pb_text _builder_version=”4.0.11″ text_font_size=”16px” text_line_height=”2em” header_2_text_color=”#0c71c3″ header_2_line_height=”1.6em” max_height=”1000px” box_shadow_style=”preset2″]

“Statistical significance is the least interesting thing about the results. You should describe the results in terms of measures of magnitude –not just, does a treatment affect people, but how much does it affect them.”

-Gene V. Glass

[/et_pb_text][/et_pb_column][et_pb_column type=”1_2″ _builder_version=”4.0.11″][et_pb_text admin_label=”Effect sizes” _builder_version=”4.0.11″ hover_enabled=”0″]

A little note on effect sizes

Although we have concluded that our results are statistically significant and can therefore reject the null hypothesis, our conclusions tell us nothing about the magnitude of the observed effect— only that it exists. Depending on your chosen analysis, the effect size will usually be presented in the results of your analysis. In our case, as we have run a t-test we should look at the associated ‘Cohen’s d‘ to determine the effect size. If your test is statistically significant it is always a good idea to report the effect size, as well as the p-value as this tells the reader both 1) the strength of your evidence in correctly rejecting the null hypothesis and 2) how large observed differences/effects/relationships are between the groups you are investigating. Read more about effect sizes here.

[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section fb_built=”1″ admin_label=”Outro” _builder_version=”4.0.11″ custom_padding=”30px|||||” locked=”off”][et_pb_row _builder_version=”4.0.11″ width=”99%”][et_pb_column type=”4_4″ _builder_version=”4.0.11″][et_pb_text admin_label=”If you need more help” _builder_version=”4.0.11″]

…Still needing a little help?

Haven’t found what you were looking for? Try browsing some of the other online resources on the home page. Additionally, you can get one-to-one support by contacting your tutor or attending one of the Math Base drop-ins held regularly throughout semester.

[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section]