# Q1(a) Joint probability table [5]

Subject: Intelligent Systems II

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/is2/#tee/mocks/paper-final-2025/q1a

Canonical: https://deep-learning-study-room.vercel.app/read/is2/tee/mocks/paper-final-2025--q1a/

100-mark timed practice using the actual Final 2025 paper. Q1 compulsory; any four of Q2–Q7. Worked solutions are below the questions.

**Question. A supermarket recorded the joint distribution of Product type (Y: premium = 1, regular = 0), Payment mode (X: credit = 1, debit = 0) and Gender (Z: female = 1, male = 0). (a) If a customer bought a premium item, find the probability that (1) they are female, (2) they paid by credit card. (b) Find (1) P(premium) and (2) P(credit card). (c) Given a male customer paid by debit card, find the probability he bought a regular item.** [5 marks]

### Answer

#### Given

The printed eight entries are reproduced below. Their total is 1.002, not 1. Therefore the table is inconsistent as a probability distribution.

|  | Credit, female | Credit, male | Debit, female | Debit, male |
| --- | --- | --- | --- | --- |
| **Premium (Y=1)** | 0.08 | 0.10 | 0.072 | 0.05 |
| **Regular (Y=0)** | 0.10 | 0.15 | 0.25 | 0.20 |

#### To find

The five requested probabilities, stating how the inconsistent data are interpreted.

#### Formula and why it applies

For this worked solution, treat all printed entries as nonnegative weights and normalise by their total 1.002. This preserves the printed ratios. It is a declared interpretation, not a claim about the examiner’s intended correction.



$$
P(E)=\frac{\text{sum of weights for }E}{\text{sum of all weights}}
$$





$$
P(A\mid E)=\frac{\text{sum of weights for }A\cap E}{\text{sum of weights for }E}
$$



#### Solution

##### Step 1. Validate the full table



$$
0.08+0.10+0.072+0.05+0.10+0.15+0.25+0.20=1.002
$$



Use total weight 1.002 consistently for unconditional probabilities.

##### Step 2. Premium row total



$$
w(premium)=0.08+0.10+0.072+0.05=0.302
$$



##### Step 3. Female given premium



$$
P(female\mid premium)=\frac{0.08+0.072}{0.302}=\frac{0.152}{0.302}\approx0.503311
$$



##### Step 4. Credit given premium



$$
P(credit\mid premium)=\frac{0.08+0.10}{0.302}=\frac{0.18}{0.302}\approx0.596026
$$



##### Step 5. Normalised premium marginal



$$
P(premium)=\frac{0.302}{1.002}\approx0.301397
$$



##### Step 6. Normalised credit marginal



$$
P(credit)=\frac{0.08+0.10+0.10+0.15}{1.002}=\frac{0.43}{1.002}\approx0.429142
$$



##### Step 7. Regular given male and debit



$$
P(regular\mid male,debit)=\frac{0.20}{0.05+0.20}=0.8
$$



**Final answer.** Under common normalisation: (a) 0.503311 and 0.596026; (b) 0.301397 and 0.429142; (c) 0.8.

**Alternative correction:** if 0.072 is corrected to 0.070, the total becomes 1 and the corresponding answers are (a) 0.50 and 0.60; (b) 0.30 and 0.43; (c) 0.8. This agrees with the interpretation used in the supplied key. State the correction; do not call raw totals 0.302 and 0.43 valid marginals of the original inconsistent table.
