areas = [
{
name: "P(A ⋀ B)",
concrete: "True positives",
color: "#c9f6ab",
textColor: "#3e6b21",
value: () => mutable p_a * mutable p_b_given_a,
corners: () =>
variables[0].derived
? [[0, 0], [mutable p_b, mutable p_a_given_b]]
: [[0, 0], [mutable p_b_given_a, mutable p_a]],
coords: () =>
variables[0].derived
? [mutable p_b / 2, mutable p_a_given_b / 2]
: [mutable p_b_given_a / 2, mutable p_a / 2]
},
{
name: "P(A ⋀ ¬B)",
concrete: "False negatives",
color: "#d1dbc9",
textColor: "#435438",
value: () => mutable p_a * (1 - mutable p_b_given_a),
corners: () =>
variables[0].derived
? [[1, 0], [mutable p_b, mutable p_a_given_not_b]]
: [[1, 0], [mutable p_b_given_a, mutable p_a]],
coords: () =>
variables[0].derived
? [(mutable p_b + 1) / 2, mutable p_a_given_not_b / 2]
: [(mutable p_b_given_a + 1) / 2, mutable p_a / 2]
},
{
name: "P(¬A ⋀ B)",
concrete: "False positives",
color: "#ffb2ac",
textColor: "#882620",
value: () => (1 - mutable p_a) * mutable p_b_given_not_a,
corners: () =>
variables[0].derived
? [[0, 1], [mutable p_b, mutable p_a_given_b]]
: [[0, 1], [mutable p_b_given_not_a, mutable p_a]],
coords: () =>
variables[0].derived
? [mutable p_b / 2, (mutable p_a_given_b + 1) / 2]
: [mutable p_b_given_not_a / 2, (mutable p_a + 1) / 2]
},
{
name: "P(¬A ⋀ ¬B)",
concrete: "True negatives",
color: "#f1f1f1",
textColor: "#333333",
value: () => (1 - mutable p_a) * (1 - mutable p_b_given_not_a),
corners: () =>
variables[0].derived
? [[1, 1], [mutable p_b, mutable p_a_given_not_b]]
: [[1, 1], [mutable p_b_given_not_a, mutable p_a]],
coords: () =>
variables[0].derived
? [(mutable p_b + 1) / 2, (mutable p_a_given_not_b + 1) / 2]
: [(mutable p_b_given_not_a + 1) / 2, (mutable p_a + 1) / 2]
}
]