+ - 0:00:00
Notes for current slide
Notes for next slide

Review

Dr. D’Agostino McGowan

1 / 15

RStudio Cloud Update

2 / 15

Make sure to bring a calculator to the exam on Thursday

3 / 15

📖 Canvas

4 / 15

Office Hours this week:

  • Wednesday 10a
  • Wednesday 2p
  • Thursday 10a
5 / 15
mpg weight automatic
21 2.6 1
22.8 2.32 1
18.7 3.4 0
14.3 3.5 0
24.4 3.1 0

You want to predict mpg using weight and automatic. Write out how you would calculate β^ in matrix form using the data provided (you need not solve the matrices)

6 / 15
mpg weight automatic
21 2.6 1
22.8 2.32 1
18.7 3.4 0
14.3 3.5 0
24.4 3.1 0

Solving the equation results in the following β^:

[β^0β^1β^2]=[80.4518.4013.30]

Using the information provided, calculate the MSE (mean squared error) for this model.

7 / 15
mpg weight automatic
21 2.6 1
22.8 2.32 1
18.7 3.4 0
14.3 3.5 0
24.4 3.1 0

[0.660.340.070.190.260.340.660.070.190.260.070.070.370.420.210.190.190.420.550.020.260.260.210.020.77]

Above is the hat matrix for the model. Use this to calculate LOOCV error for this model

8 / 15
mpg weight automatic
15 3.8 0
30.3 1.9 1
40.9 1.5 1
20.1 3.4 0
26 2.1 1

You get a new test data set (above). Using the same model you fit to the training data, calculate the MSE in this test dataset

9 / 15
class x
1 -0.57
1 -1.26
1 1.13
2 3.3
2 5.4

Using the data above, calculate πk, μk, and σ2

10 / 15
class x
1 -0.57
1 -1.26
1 1.13
2 3.3
2 5.4

Using LDA, what is are the discrimant scores for x = 3? Which class would you classify this point into?

11 / 15
class x
1 -0.57
1 -1.26
1 1.13
2 3.3
2 5.4

What is the probability that an observation where x = 3 is in class 1?

12 / 15
class x
1 -0.57
1 -1.26
1 1.13
2 3.3
2 5.4

What is the decision boundary for this LDA problem?

13 / 15

P(+ | Drug User) = 0.8

P(Drug User) = 0.1

P(+ | Not a drug user) = 0.2

  • What is the probability of being a drug user give you test positive?
14 / 15
Truth (+) Truth (-) total
Predicted (+) 10 20 30
Predicted (-) 5 50 55
Total 15 70 85
  • What is the accuracy?
  • What is the false positive rate?
  • What is the false negative rate?
15 / 15

RStudio Cloud Update

2 / 15
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow