- 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 10 and 11: Sample• A Sample is a subset of a
- Page 12 and 13: 2h 15:25 (2003)2h 03:38 (2011)- An
- Page 14 and 15: • Think of it as a metaphor - if
- Page 16 and 17: Major sources of data• Sample sur
- Page 18 and 19: Gamebird survey results4 May 25 May
- Page 22 and 23: Replication and randomisation• Re
- Page 24 and 25: Polio vaccine trial• Acute viral
- Page 26 and 27: Confounding• Between 1972 and 197
- Page 28 and 29: Case-Control Study• Retrospective
- Page 30 and 31: Good and Bad studies• Reliable sa
- Page 32 and 33: • Bayesians consider probability
- Page 34 and 35: • In this case the addition rule
- Page 36 and 37: Hospital Patients - Question 2• A
- Page 38 and 39: • Or we can calculate P r(A ∩ B
- Page 40 and 41: Handedness vs Gender - Combined Pro
- Page 42 and 43: P r(X = 1) = 1 − 0.288 − 0.216
- Page 44 and 45: Definitions IIPositive Predictive V
- Page 46 and 47: Negative Predictive value• Find t
- Page 48 and 49: Sensitive Survey Questions• Somet
- Page 50 and 51: Probability DistributionNote that f
- Page 52 and 53: X = x i Pr(X = x i )0 0.101 0.252 0
- Page 54 and 55: Rearranging the FormulaC = 5 (F −
- Page 56 and 57: • The variance of Z can be calcul
- Page 58 and 59:
Pr(D ∩ T)Pr(D| T) =Pr(T)P r(D| T)
- Page 60 and 61:
5 Probability DistributionsFred’s
- Page 62 and 63:
Since all the Y’s come from the s
- Page 64 and 65:
PROBABILITY OF X SUCCESSESThe proba
- Page 66 and 67:
2.( nP r (X = x) = πk)x (1 − π)
- Page 68 and 69:
Use R commander or R excel4. In a p
- Page 70 and 71:
5.2 Normal DistributionDISTRIBUTION
- Page 72 and 73:
Normal Distribution Notes• The gr
- Page 74 and 75:
• Find P r(Z > 1.64)pnorm(1.64,lo
- Page 76 and 77:
• Find P r(−2 < Z < 2)pnorm(2)-
- Page 78 and 79:
AREAS UNDER THE CURVE USING R-COMMA
- Page 80 and 81:
Find the height which is exceeded b
- Page 82 and 83:
WHEN IS THE USE OF A NORMAL APPROXI
- Page 84 and 85:
Here the mean is n × π = 100 × 0
- Page 86 and 87:
drug is more effective than the sta
- Page 88 and 89:
What is the probability a player co
- Page 90 and 91:
6.1 Introduction to Sampling Distri
- Page 92 and 93:
• If sample size n is greater, th
- Page 94 and 95:
6.2 Confidence Interval for the Mea
- Page 96 and 97:
EXAMPLEA pharmacologist is investig
- Page 98 and 99:
6.2.2 The t DistributionTHE t DISTR
- Page 100 and 101:
6.2.3 Interpreting a Confidence Int
- Page 102 and 103:
• Standard error of the differenc
- Page 104 and 105:
[2.] Comparing means for small samp
- Page 106 and 107:
6.3.2 Transforming DataTRANSFORMING
- Page 108 and 109:
6.3.3 Comparing Two Non-Independent
- Page 110 and 111:
CALCULATING THE CONFIDENCE INTERVAL
- Page 112 and 113:
SolutionThe 95% C.I. for π is:√p
- Page 114 and 115:
6.4.3 Confidence Interval for Diffe
- Page 116:
As Fred wants to know the proportio
- Page 119 and 120:
7 Hypothesis TestingFred’s Parkin
- Page 121 and 122:
• If the standard deviation is un
- Page 123 and 124:
Find the p-value:Pr(Z < -2.78)=0.00
- Page 125 and 126:
EXAMPLE THREE (B) - HYPOTHESIS TEST
- Page 127 and 128:
7.4 Hypothesis Test Difference Two
- Page 129 and 130:
7.5 Interpreting the p-valueINTERPR
- Page 131 and 132:
(a) Mean difference = 40, confidenc
- Page 133 and 134:
INCONCLUSIVE CONFIDENCE INTERVALSNo
- Page 135 and 136:
ERROR TYPESAccept RejectH 0 True Co
- Page 137 and 138:
Part IIFred sets the hypothesis out
- Page 139 and 140:
8 Contingency TablesFred’s Garden
- Page 141 and 142:
• For the purpose of this course
- Page 143 and 144:
What can we do with this informatio
- Page 145 and 146:
So in our swimming example:• Odds
- Page 147 and 148:
Confidence interval for relative ri
- Page 149 and 150:
So the confidence interval is given
- Page 151 and 152:
ln(OR) ± 1.96 × s.e.(ln(OR))−0.
- Page 153 and 154:
8.6 Chi Square Test for Contingency
- Page 155 and 156:
• We can continue to calculate th
- Page 157 and 158:
Some notes on χ 2• Maximum power
- Page 159 and 160:
Admit Decline TotalMale 490 [449.2]
- Page 161 and 162:
• ¯x = Σn ix iN = 2174868 = 2.5
- Page 163 and 164:
Fred’s GardenSo Fred recorded the
- Page 165 and 166:
Since 1 is excluded there is strong
- Page 167 and 168:
AdoptiveBiological Parents’ SESPa
- Page 169 and 170:
EXAMPLE: Cuckoo Egg LengthsCompare
- Page 171 and 172:
9.1.3 F DistributionF DISTRIBUTION
- Page 173 and 174:
EXAMPLE20 children allocated random
- Page 175 and 176:
RESIDUAL MEAN SQUARE (s 2 e)Group A
- Page 177 and 178:
Notes• Degrees of freedom are 15
- Page 179 and 180:
9.4 Two factor ANOVATWO FACTOR ANOV
- Page 181 and 182:
• Conclusion:There is some eviden
- Page 183 and 184:
NOTES• We need to give two parts
- Page 185 and 186:
CONFOUNDING VARIABLEPotential varia
- Page 187 and 188:
INTERACTIONA significant interactio
- Page 189 and 190:
CALCULATING INTERACTION EFFECTInter
- Page 191 and 192:
• Convert numerical group names i
- Page 193 and 194:
• The city effect is not the same
- Page 195 and 196:
General Level SS = 18 x ( 26418 )2=
- Page 197 and 198:
Calculating the Test StatisticTest
- Page 199 and 200:
And finally he needed to work out t
- Page 201 and 202:
2. H 0 The mean IQs of children wit
- Page 203 and 204:
He sent her some data resulting fro
- Page 205 and 206:
More complex relationships• Look
- Page 207 and 208:
Equation for a straight line• We
- Page 209 and 210:
Instead use method of least squares
- Page 211 and 212:
• Compute interceptˆβ 0 = ȳ
- Page 213 and 214:
An example - Analysis of variance
- Page 215 and 216:
Normality Assumption P-P plotPP Plo
- Page 217 and 218:
2nd Residual Plot FAILStandardized
- Page 219 and 220:
n∑(x i − ¯x) 2 = 23485.35i=1x
- Page 221 and 222:
Prediction Interval• We can find
- Page 223 and 224:
• A confidence interval estimates
- Page 225 and 226:
Correlation• The correlation coef
- Page 227 and 228:
Non-linear Correlation• In the pr
- Page 229 and 230:
• Therefore r 2 = 0.8931, so 89.3
- Page 231 and 232:
• where ˆβ 0 , ˆβ 1 , ˆβ 2
- Page 233 and 234:
• Age alone.ŷ = 5.0688 + 0.0359a
- Page 235 and 236:
Dummy variables in lung capacity ex
- Page 237 and 238:
Height Vs Lung Capacity• From bef
- Page 239 and 240:
Three variable modelTest of the Hyp
- Page 241 and 242:
• Giving a confidence interval of
- Page 243 and 244:
Extra sum of squares modelSource of
- Page 245 and 246:
●●LinearModel.2res−2 −1 0 1
- Page 247 and 248:
• At this stage the ages have bee
- Page 249 and 250:
Multiple Regression• Now lets per
- Page 251 and 252:
Multiple Linear Regression GraphTre
- Page 253 and 254:
Source of variation SS DF MS FRegre
- Page 255 and 256:
p1−p = expβ 0 + β 1 x 1 + . . .
- Page 257 and 258:
• logit = −1.674 + 1.841x 1Logi
- Page 259 and 260:
• OR = 6.98 (1.524,27.987)• The
- Page 261 and 262:
Example• The adjusted OR and CI w
- Page 263 and 264:
Next Fred calculated the β 1 :n∑
- Page 265 and 266:
This gives a confidence interval of
- Page 267 and 268:
ATools for assignmentsCommon Mistak
- Page 269 and 270:
Correct Approachå Evaluate 1.9
- Page 271 and 272:
BSummary of Formulae1. Normal Distr
- Page 273:
Estimate df (ν) Multiplier Standar