vi. 16 marks Table 1 gives the predicted probabilities and predicted response values for the data set.
Complete the table by filling in the two missing p, values and all the ý, values, using a threshold
value of 0.5. Show your work by hand for calculating the two missing p, values.
Table 1: Prediction Table for Leukemia Logistic Regression Model
Obs No. CellCount AG Yi Pi
Prediction Class
1
2.3
1
1
2
0.75
1
1
3
4.3
1
1
0.6936
4
2.6
1
1
0.705
5
6
1
0
0.682
6
10.5
1
1
0.6502
7
10
1
1
0.6538
8
17
1
0
0.602
9
5.4
1
0
0.6861
10
7
1
1
0.6751
11
9.4
1
1
0.6582
12
32
1
0
0.4843
13
35
1
0
0.4605
14
52
1
0
0.3322
15
100
1
0 0.09766
16
100
1
0 0.09766
17
100
1
1 0.09766
2
Obs No. CellCount AG y pi
Prediction Class
18
4.4
0
1 0.1904
19
3
0
1
0.1974
20
4
0
0
0.1924
21
1.5
0
0
0.2051
22
9
0
0
0.1689
23
5.3
0
0
0.1861
24
10
0
0
0.1645
25
19
0
0
0.1289
26
27
0
0
0.1029
27
28
0
0 0.1
28
31
0
0 0.09177
29
26
0
0 0.1059
30
21
0
0 0.1219
31
79
0
0 0.02151
32
100
0
0 0.01116
33
100
0
0 0.01116
vii. 18 marks Make a two-way frequency table like Table 2 comparing the predicted responses with
actual responses. Label the cells with "TP' for 'True Positive', 'TN' for 'True Negative', etc.
Table 2: Two-Way Frequencies of Actual vs. Predicted Liver Cancer Survivals
Actual Condition
Positive(y1) Negative (y=0) Total
Predicted Positive (y = 1)
Condition Negative(, = 0)
Total
viii. 4 marks) Calculate the sensitivity and specificity of the model in this case.
---