1 STA 536 – Experiments with a Single Factor Regression and ANOVA
2 STA 536 – Experiments with a Single Factor Relation between x and y Correlation r : is there a relationship between 2 variables? Regression: how well a certain independent variable predict dependent variable? CORRELATION CAUSATION In order to infer causality: manipulate independent variable and observe effect on dependent variable 2
3 STA 536 – Experiments with a Single Factor In the real world… r is never 1 or –1 find best fit of a line in a cloud of observations: Principle of least squares ε y = ax + b ε = residual error =, true value =, predicted value 3
4 STA 536 – Experiments with a Single Factor The relationship between x and y : Finding a and b Population: Model: Solution least squares minimisation: 4
5 STA 536 – Experiments with a Single Factor The relationship between x and y 5
6 STA 536 – Experiments with a Single Factor What can the model explain? Total variance = predicted variance + error variance ) ˆ ( 2 ˆ 2 ii yy yy sss 2 6
7 STA 536 – Experiments with a Single Factor
8 An example: Number of menstrual cycles per year (CYC) in 3 groups of women Controls Joggers Runners Controls Joggers Runners
9 STA 536 – Experiments with a Single Factor Descriptive Statistics Obs Mean Std Dev Minimum Maximum Controls Joggers Runners Mean Std Dev
10 STA 536 – Experiments with a Single Factor Boxplot (Minitab – Graph – Boxplot) 10
11 STA 536 – Experiments with a Single Factor Data, grand mean, group means 11
12 STA 536 – Experiments with a Single Factor 12
13 STA 536 – Experiments with a Single Factor 13
14 STA 536 – Experiments with a Single Factor 14
15 STA 536 – Experiments with a Single Factor SS total =SS group +SS error 15
16 STA 536 – Experiments with a Single Factor