- Page 1 and 2:
Contents1 Course Administration 42
- Page 3 and 4:
10 Regression 20210.1 Introduction
- Page 5 and 6:
Resource PageDepartment of Mathemat
- Page 9 and 10:
3 Data and Study Designs3.1 Basic d
- Page 11 and 12:
Parameter• Parameter: Fixed numbe
- Page 13 and 14:
TypesDiscrete - can put in one-to-o
- Page 15 and 16:
- How do geologists know?- Sediment
- Page 17 and 18:
Source: skyscrapercity.comSampling
- Page 19:
- 1 in 3.8 million - 3.8 million di
- Page 23 and 24:
Important designs• Completely ran
- Page 25 and 26:
B. Randomised control - of all chil
- Page 27 and 28:
- Reason why observational studies
- Page 29 and 30:
Things that go wrong• Even the be
- Page 31 and 32:
4 ProbabilityFred’s DayFred awoke
- Page 33 and 34:
• The event that the mouse we tra
- Page 35 and 36:
Blood donor example - Multiplicatio
- Page 37 and 38:
Fair Die Example• A fair die is t
- Page 39 and 40:
Tree diagram rules• Add Verticall
- Page 41 and 42:
Tree Diagrams - Independent Stages0
- Page 43 and 44:
Dependent Stages• Andrew, John an
- Page 45 and 46:
0.90BBiopsy +ve (true positive)0.00
- Page 47 and 48:
Calculating Probabilities• Estima
- Page 49 and 50:
4.3 Random VariablesRandom Variable
- Page 51 and 52:
Calculating the Variance• The sam
- Page 53 and 54:
Examples• Consider a data set XX
- Page 55 and 56:
Combining 2 Random Variables• If
- Page 57 and 58:
Fred’s DayShould Fred be worried
- Page 59 and 60:
Now using the complementary event r
- Page 61 and 62:
Mean of Binary DistributionThe mean
- Page 63 and 64:
• Mean number of successes• Var
- Page 65 and 66:
Using the Formulan = 3, x = 2, π =
- Page 67 and 68:
• A probability less than 0.05 is
- Page 69 and 70:
Endangered bird egg example solutio
- Page 71 and 72:
RELATIVE FREQUENCY HISTOGRAMNormal
- Page 73 and 74:
Finding Areas Under the Curve• In
- Page 75 and 76:
• Find P r(−1 < Z < 1.64)pnorm(
- Page 77 and 78:
INVERSE PROBLEMS USING R-COMMANDER
- Page 79 and 80:
CALCULATING PROBABILITIESAssume tha
- Page 81 and 82:
CONTINUITY CORRECTION• Normal pro
- Page 83 and 84:
Sample size = 10Consider the situat
- Page 85 and 86:
ConclusionWhat conclusion would you
- Page 87 and 88:
10%5.5 6.0 6.5 7.0 7.5 8.0 8.5XWe k
- Page 89 and 90:
6 Sampling Distributions and Estima
- Page 91 and 92:
DERIVATION IWe can think of the sam
- Page 93 and 94:
Solution IIPr(X > 172) = 1 - pnorm(
- Page 95 and 96:
qnorm(0.975) as 2.5% of the area is
- Page 97 and 98: 6.2.1 Sample Size CalculationEXAMPL
- Page 99 and 100: The 99% Confidence IntervalThe 99%
- Page 101 and 102: 6.3 Comparing Two SamplesCOMPARING
- Page 103 and 104: THE POOLED VARIANCEIf the variances
- Page 105 and 106: SOLUTION - Calculating the confiden
- Page 107 and 108: Confidence Interval for raw dataTo
- Page 109 and 110: = 6.6 ± 24.6That is, -18.0 < µ in
- Page 111 and 112: STANDARD DEVIATIONIf P = X n : σP
- Page 113 and 114: 6.4.2 Sample Size CalculationEXAMPL
- Page 115 and 116: Fred for MayorFred has decided to t
- Page 118 and 119: Fred’s mate Bob pointed out that
- Page 120 and 121: ALTERNATIVE HYPOTHESESTwo types:Stu
- Page 122 and 123: • If we use the sample standard d
- Page 124 and 125: Calculate the test statistic:Test s
- Page 126 and 127: Finding the pooled variance:Recall
- Page 128 and 129: Caluclate the estimated standard er
- Page 130 and 131: 7.6 Significance and Conclusiveness
- Page 132 and 133: Conclusion: There is no evidence th
- Page 134 and 135: Some practical pointers• Aim for
- Page 136 and 137: Fred’s Parking & Extracurricular
- Page 138 and 139: Fred calculated the p-value using t
- Page 140 and 141: Fred told Carol he would use odds r
- Page 142 and 143: Flu vaccine example• There were 1
- Page 144 and 145: 8.3 Attributable Risk (AR)The attri
- Page 146 and 147: • Therefore w x ≈ww+x and y z
- Page 150 and 151: Mobile phone example• Human expos
- Page 152 and 153: OR = 0.81 with CI (0.39,1.70)• p
- Page 154 and 155: • We calculate these expected cou
- Page 156 and 157: • We can calculate the p value us
- Page 158 and 159: χ 2 =(100 − 108.99)2 (107 − 11
- Page 160 and 161: • The reason for the discrepancy
- Page 162 and 163: Summary - Confidence IntervalsFacto
- Page 164 and 165: Since 1 is excluded from this 95% i
- Page 166 and 167: 9 ANOVAFred’s Public ImageSince F
- Page 168 and 169: • Previously used two sample t-te
- Page 170 and 171: • This tells us if the observed d
- Page 172 and 173: RESIDUAL MEAN SQUARE (s 2 e)Group A
- Page 174 and 175: 9.2 Post ANOVA AnalysisPOST ANOVA A
- Page 176 and 177: • Hence no need to additionally c
- Page 178 and 179: Since zero is excluded, and the int
- Page 180 and 181: SUM OF SQUARESTotal SS = 93 2 + 100
- Page 182 and 183: General Level SS = 12 x ( 9812 )2=
- Page 184 and 185: ANOVA TABLEA one factor analysis of
- Page 186 and 187: Data > Manage variables in active d
- Page 188 and 189: DATA COMPONENTSEach data value can
- Page 190 and 191: ANOVA TABLE - Two Factor FactorialS
- Page 192 and 193: A B C D EChristchurch 120.5 119 122
- Page 194 and 195: DataFERTILISER LEVELSEED TYPE Low M
- Page 196 and 197: Interaction PlotsHypothesis test fo
- Page 198 and 199:
Fred’s WeightUsing the informatio
- Page 200 and 201:
Fred wanted to address the followin
- Page 202 and 203:
10 RegressionFred’s Dog/BeardFred
- Page 204 and 205:
2. studies which have measured bina
- Page 206 and 207:
• What if we colour code the poin
- Page 208 and 209:
Statistically• We use slightly di
- Page 210 and 211:
Blood pressure exampleStress(x) Blo
- Page 212 and 213:
Focussed look on the limits of our
- Page 214 and 215:
Height example• We will perform a
- Page 216 and 217:
Normality Assumption FAILPP PlotExp
- Page 218 and 219:
10.3 Confidence Intervals and Regre
- Page 220 and 221:
0.236 < β 1 < 0.496• We can conc
- Page 222 and 223:
95% confidence and prediction inter
- Page 224 and 225:
100m World Record Progression●●
- Page 226 and 227:
Negative correlation• The denomin
- Page 228 and 229:
Stress exampleStress(x) Blood Press
- Page 230 and 231:
10.5 Multiple regression• Simple
- Page 232 and 233:
• Appears that total lung capacit
- Page 234 and 235:
Multiple linear regression predicti
- Page 236 and 237:
Three variable modelIntepreting Mod
- Page 238 and 239:
• So for men we have:y = −7.066
- Page 240 and 241:
• Is the variable age an importan
- Page 242 and 243:
Extra sum of squares principle• T
- Page 244 and 245:
Diagnostics• Remember our Assumpt
- Page 246 and 247:
TableTreatmentControlBP(Y) AGE(X) B
- Page 248 and 249:
• So for people in the control gr
- Page 250 and 251:
Discussion• The value of d is the
- Page 252 and 253:
Multiple Linear RegressionTreatment
- Page 254 and 255:
• Logistic regression is sometime
- Page 256 and 257:
• Given the s.e.(OR) = 0.751. Thi
- Page 258 and 259:
• We get the same as when we calc
- Page 260 and 261:
Female(0)Male(1)Born Left(1) Right(
- Page 262 and 263:
Fred’s Dog/BeardTo help solve his
- Page 264 and 265:
This is a very high r 2 value and i
- Page 266 and 267:
Attractiveness = 4.85 − 0.03 × (
- Page 268 and 269:
• Because the calculator does div
- Page 270 and 271:
• Install R Commander from the R
- Page 272 and 273:
- In large random samples (n 1 and