# Selecting A Statistical Test

Science and technology headlines in the news are always presenting some association or group difference.

Sometimes it sounds like this: u201cResearchers find sloths are significantly faster on the moon!u201d Other times, the headlines may involve psychology and nutrition: u201cScientists discover that eating three pieces of fruit everyday will improve your sleep!u201d

Who are theseu00a0scientistsu00a0and how do they make these exciting findings? Each of these headlines describes a specific study, measuring independent and dependent variables. The type of data collected affects the type of statistical analysis that scientists can use. On your journey through research, statistical testing will be your favorite source of both epiphany and frustration.

Statistical tests that measure the ways that independent and dependent variables relate to each other test relationships. Tests that look for differences between groups instead test whether the means between two randomly sampled groups are different.

## Testing Relationships

I want to see what happens to my writing speed and the frequency of typos that occur when I drink coffee. Being very particular, I can measure the levels of caffeine in each cup. Here, there arenu2019t any tests for telling differences between groups, instead, I want to see how caffeine consumption impacts my writing.

Strong positive correlations would indicate that caffeine makes me write faster and make more typos. A negative correlation would indicate that it helps me slow down my writing and reduce my mistakes.

Two methods to measure the relationships between variables areu00a0Spearman and Pearson correlations.

The Pearson correlation looks at two continuous variables to provide a coefficient of determination (r2). This then tells us the directionality and strength of this correlation. The closer r2 is to 1 or -1, the better the model.

On the other hand, Spearman correlation orders and ranks the values first, before determining the relationship. You can use Spearmanu2019s correlation for ordinal or ranked data.

## Testing Differences

When you have data collected from two independently sampled populations, chances are you want to see if there is a difference between their means.

You might, for example, measure the differences in cognition between older people that exercise and those that donu2019t. Depending on the type of data you collect, there are different options for your statistical tests.

A T-Test can tell you the difference between the means in two separate groups. It tests the null hypothesis, that there is no difference between the means in the two groups.

ANOVAs are like beefed-up T-tests, where you can look for differences in more than two different groups. We will discuss the nuances of these different tests in future blog posts.

## Takeaway

Thereu2019s a time in every young researcheru2019s life where they must decide how to test their data. Donu2019t make it complicated or confusing, ask yourself first what kind of hypothesis you are testing. Are you looking to see how dependent variables change with an independent variable? Or do you have multiple different groups in your study, and you need to find out if their experimental means are different. Once you answer these questions, youu2019re halfway to finding the right statistical test.