Build Cedar Valley’s 2 × 2 table as nested lists, read a marginal, a joint and two conditionals from it, and compute P(fraud) for Georgian Bay Mutual by adding the two branch products.
Build Cedar Valley’s 2 × 2 table as nested lists, read a marginal, a joint and two conditionals from it, and compute P(fraud) for Georgian Bay Mutual by adding the two branch products.
Answer
# rows: branch, online; columns: approved, declined table = [[150, 50], [120, 80]] total = sum(sum(row) for row in table) approved = table[0][0] + table[1][0] online = sum(table[1]) print(f"P(approved)={approved / total:.4f} P(online and declined)={table[1][1] / total:.4f}") print(f"P(declined|online)={table[1][1] / online:.4f} P(online|approved)={table[1][0] / approved:.4f}") p_fraud = 0.60 * 0.10 + 0.40 * 0.04 print(f"P(fraud)={p_fraud:.4f}")
IBS1 §3.4 (contingency tables; frequency tree to probability tree), BCc ch 4 (table setup), CC BY 4.0 — shape only; original dataset