Depending on the types of variables you use (categorical or numeric) in your analysis will determine which statistical tests you use to determine if your data is statistically significant e.g one sample proportion test, chi-squared test, t-test, ANOVA, correlation test.

One categorical variable: 1 sample proportion test

Two categorical variables: Chi squared

One numeric: t-test

One numeric and one categorical: t-test or ANOVA (if there are more than 2 categories for that categorical variable)

Two numeric: correlation test

One categorical variable

Let’s say you have 1 categorical variable you are analyzing e.g. Is there a difference in the number of men and women in the population?

In order to disprove the null hypothesis that there is no difference between males and females and that the differences we are seeing are not a result of our sample group randomly having a bias, you pick an alpha value (p < 0.05) and if your one sample proportion test is less than p, your results are likely not a result of random chance and thus statistically significant.

Two categorical variables

Let’s say you have 2 categorical variables (Sex[Male or Female] and Age Group[Child or Adult or Elderly]). You could ask ‘Does the proportion of males and females differ across age groups?’

The hypothesis is ‘The number of each sex that we observe is dependent on the Age group.’ You can test if any differences you see in you data are due to chance by testing if the proportion of males and females is independent of Age group. Use the chi-squared test to get a p value.

One numeric

‘Is the average height different from a previously established height?’ Use a t-test.

One numeric and one categorical

‘Is the a difference in height between men and women?’ This is one categorical with two categories and one numeric. Use a t-test

‘Is there a difference in height between Age groups’ This is one categorical with three categories and one numeric. Use ANOVA.

Two numeric variables

‘Is there a relationship between height and weight?’ Use the correlation test. Unlike all the other tests, you get a correlation coefficient which tells you about the relationship as well as the p value. The correlation coefficient is a number between -1 and 1 and looks at the relationship between two numeric variables. If the while the x value gets larger and the y value gets smaller, that is -1. If when x gets larger and y gets larger too, the coefficient is 1.

LS0tDQp0aXRsZTogIlN0YXRpc3RpY2FsIFRlc3RzIg0Kb3V0cHV0Og0KICBodG1sX2RvY3VtZW50OiANCiAgICB0b2M6IHllcw0KICAgIHRvY19kZXB0aDogMg0KICAgIHRvY19mbG9hdDogeWVzDQogICAgaGlnaGxpZ2h0OiB6ZW5idXJuDQogICAgY29kZV9kb3dubG9hZDogdHJ1ZQ0KICAgIGluY2x1ZGVzOg0KICAgICAgaW5faGVhZGVyOiBoZWFkZXIuaHRtbA0KLS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