# Review 2

When to use each test?

## T-test (one sample)

**Quantity of variables:**1**Types of variables:**continuous**Null hypothesis:**some value (usually sample mean) = population mean

## T-test (independent sample)

**Quantity of variables:**2**Types of variables:**1 categorical (with 2 categories), 1 continuous**Null hypothesis:**population mean for category 1 = population mean for category 2

## T-test (paired sample)

**Quantity of variables:**2**Types of variables:**2 continuous (same variables but different time periods)**Null hypothesis:**population mean at time 1 = population mean at time 2

Note: Observations should be paired across time.

## One-way ANOVA

**Quantity of variables:**2**Types of variables:**1 categorical (with 2*or more*categories), 1 continuous.**Null hypothesis:**population mean for category 1 = population mean for category 2 = population mean for category 3 = …

## Two-way ANOVA

**Quantity of variables:**3**Types of variables:**2 categorical (with 2*or more*categories each), 1 continuous.**Null hypothesis:**No*interaction*between categorical variable 1 and categorical variable 2

Note: In other words, our null is that one categorical variable does not influence the effect of the other categorical variable on our continuous variable.

## Pearson’s correlation

**Quantity of variables:**2**Types of variables:**2 continuous.**Null hypothesis:**Pearson’s correlation coeff. for the population = 0. Variable1 and variable2 are not correlated.

## Simple linear regression

**Quantity of variables:**2**Types of variables:**2 continuous (usually)**Null hypothesis:**regression coef. for the population = 0. In other words, our independent variable does not predict our dependent variable.

Note: The key point here is that you have a dependent and an independent variable, meaning that you assume the direction of the relationship. Therefore, regression is more appropriate for predictions.

## Chi-square test for independence

**Quantity of variables:**2 (or more)**Types of variables:**2 categorical**Null hypothesis:**Variable1 is independent of Variable2.

## Practice questions

Open the “school_data.sav” data set.

Choose the appropriate test for the following questions:

- Did schools improve their average scores between 1999 and 2000?
- Does average class size influences average achievement in the year 2000?
- Is there a relationship between percentage of parents who have completed HS and achievement in a given school?
- Is there a relationship between percentage of free meals in a given school and whether the school has summer classes?
- Do California schools with summer classes (year round schools) have higher average achievement?
- Is the mean achievement for the schools in the sample a good representative of the mean achievement for all California elementary schools?
- Suppose percentage of free meals are associated with achievement. Does the existence of summer courses in a school influences this relationship?
- Is average student achievement different between schools with different percentage of free meals?

Hint: Look carefully at the variable labels in your data. Note if the variable is continuous or categorical.