Pivot table - Probabilities Question (Please show the probabilities in decimal f
ID: 3727719 • Letter: P
Question
Pivot table - Probabilities Question (Please show the probabilities in decimal form)
Using the two pivot tables above, please answer the following probability questions:
a. Compute the following quantities [P(A|B) means “the probability of A given B”]:
i. P(CC = 1|Loan = 1) (the proportion of credit card holders among the loan acceptors)
ii. P(Online = 1|Loan = 1)
iii. P(Loan = 1) (the proportion of loan acceptors)
iv. P(CC = 1|Loan = 0)
v. P(Online = 1|Loan = 0)
vi. P(Loan = 0)
b. Use the quantities computed above to compute the naive Bayes probability P(Loan = 1|CC = 1,> Online Count of ID Personal Loan 1827 189 2016 2693 291 2984 1 Grand Total 4520 480 5000 Grand Total CreditCard Count of ID Personal Loan 3193 337 3530 1327 143 1470 1 Grand Total 4520 480 5000 Grand Total
Explanation / Answer
SOLUTIONS:-
(a):-(i). P(CC = 1|Loan = 1) (the proportion of credit card holders among the loan acceptors)
= 143/480=0.297
(ii). P(Online = 1|Loan = 1)
= 291/480=0.606
(iii). P(Loan = 1) (the proportion of loan acceptors)
= 480/5000=0.096
(iv).P(CC = 1|Loan = 0)
= 1327/4520=0.293
(v). P(Online = 1|Loan = 0)
= 2693/4520=0.595
(vi). P(Loan = 0)
= 4520/5000=0.904
(b).naive Bayes probability P(Loan = 1|CC = 1,>
= (0.297 * 0.606 * 0.096) / [(0.297 * 0.606 * 0.096) + (0.293 * 0.595 * 0.904)]
= 0.0172 / (0.0172+0.157)
= 0.0172 / 0.1742
= 0.098
==================================================================================