Lecture 2

Contents

Sample Question

Question 1

If two dice are rolled, what is the probability that the sum of the upturned faces will equal 7?

Solution:
Assuming all 36 possible outcomes are equally likely. There are 6 outcomes that give a sum of 7:

(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)(1,6), (2,5), (3,4), (4,3), (5,2), (6,1)

Hence, the desired probability is

P(sum=7)=636=16.P(\text{sum} = 7) = \frac{6}{36} = \frac{1}{6}.

Question 2

A total of 36 members of a club play tennis, 28 play squash, and 18 play badminton. Furthermore, 22 of the members play both tennis and squash, 12 play both tennis and badminton, 9 play both squash and badminton, and 4 play all three sports. How many members of this club play at least one of three sports?

Solution:
Let NN denote the number of members of the club. Let

  • TT = members that play tennis
  • SS = members that play squash
  • BB = members that play badminton

From the principle of inclusion-exclusion:

P(TSB)=P(T)+P(S)+P(B)P(TS)P(TB)P(SB)+P(TSB)P(T \cup S \cup B) = P(T) + P(S) + P(B) - P(TS) - P(TB) - P(SB) + P(TSB) =36+28+1822129+4= 36 + 28 + 18 - 22 - 12 - 9 + 4 =43= 43

Hence, 43 members play at least one sport.


Question 3

An insurance company classifies people as accident-prone or not.

  • P(accidentprone)=0.4P(\text{accident} | \text{prone}) = 0.4
  • P(accidentnot prone)=0.2P(\text{accident} | \text{not prone}) = 0.2
  • P(prone)=0.3P(\text{prone}) = 0.3 What is the probability that new policy holder will have accident?

Solution The probability that a new policyholder will have an accident is:

P(A1)=P(A1A)P(A)+P(A1Ac)P(Ac)=0.40.3+0.20.7=0.26P(A_1) = P(A_1|A)P(A) + P(A_1|A^c)P(A^c) = 0.4 \cdot 0.3 + 0.2 \cdot 0.7 = 0.26

Question 4

At a certain stage of a criminal investigation, the inspector in charge is 60 percent convinced of the guilt of a certain suspect. Suppose, however, that a new piece of evidence which shows that the criminal has a certain characteristic (such as left-handedness, baldness, or brown hair) is uncovered. If 20 percent of the population possesses this characteristic, how certain of the guilt of the suspect should the inspector now be if it turns out that the suspect has the characteristic?

Solution

Letting GG denote the event that the suspect is guilty and CC the event that he possesses the characteristic of the criminal, we have P(GC)=P(GC)P(C)P(G \mid C) = \frac{P(GC)}{P(C)}\\ =P(CG)P(G)P(CG)P(G)+P(CGc)P(Gc)= \frac{P(C \mid G) P(G)}{P(C \mid G) P(G) + P(C \mid G^c) P(G^c)}\\ =1(.6)1(.6)+(.2)(.4)= \frac{1(.6)}{1(.6) + (.2)(.4)}\\ .882\approx .882\\ where we have supposed that the probability of the suspect having the characteristic if he is, in fact, innocent is equal to .2.2, the proportion of the population possessing the characteristic.


Case Study: Smart Fire Detection in a Warehouse

A large logistics company has deployed a Smart Fire Detection System (SFDS) in its warehouse, utilizing an array of Internet of Things (IoT) sensors that monitor temperature, smoke density, and CO2\text{CO}_2 levels. The goal is to detect a fire (H1H_1) while minimizing false alarms (H0H_0).

The SFDS makes a detection decision DD based on aggregated sensor data. A key component of the system is the Conditional Probability modeling of sensor readings, and the final decision rule is based on the Neyman-Pearson theorem to maintain a strict maximum on the false alarm rate.

System Parameters:

  • Prior Probability: The probability of a fire occurring on any given day is P(H1)=0.001P(H_1) = 0.001.
  • Likelihoods: The system outputs a combined "Fire Score" SS. The probability density functions (PDFs) for this score under the two hypotheses are modeled as:
    • Under No Fire (H0H_0): SExponential(λ0)S \sim \text{Exponential}(\lambda_0), with λ0=1\lambda_0 = 1 (i.e., f(SH0)=eSf(S \mid H_0) = e^{-S} for S0S \ge 0).
    • Under Fire (H1H_1): SExponential(λ1)S \sim \text{Exponential}(\lambda_1), with λ1=0.5\lambda_1 = 0.5 (i.e., f(SH1)=0.5e0.5Sf(S \mid H_1) = 0.5 e^{-0.5S} for S0S \ge 0).
  • Threshold: The SFDS declares a fire (D=H1D = H_1) if the score SS exceeds a certain threshold τ\tau.

Questions:

  1. Conditional Probability (Type I Error): The company mandates that the Probability of False Alarm (Type I Error, α\alpha) must not exceed 0.05\mathbf{0.05} (i.e., 5%) to avoid unnecessary operational disruption.
    • Calculate the minimum detection threshold (τ\tau) that the SFDS must use to satisfy this constraint. (α=P(D=H1H0)\alpha = P(D=H_1 \mid H_0)).
  2. Neyman-Pearson Theorem (Power): Given the threshold τ\tau calculated in part 1 (rounded to four decimal places), determine the resulting Probability of Detection (Power, β\beta) that the system achieves. (β=P(D=H1H1)\beta = P(D=H_1 \mid H_1)).
  3. Bayesian Update (Posterior Probability): If the SFDS registers a fire score of S=3S=3 and declares an alarm, what is the Posterior Probability that a fire has actually occurred? (P(H1S=3)P(H_1 \mid S=3)).

Worked-Out Solution

1. Conditional Probability (Type I Error)

We must find τ\tau such that PFA=α0.05P_{FA} = \alpha \le 0.05.

PFA=α=τf(SH0)dSP_{FA} = \alpha = \int_{\tau}^{\infty} f(S \mid H_0) dS α=τeSdS\alpha = \int_{\tau}^{\infty} e^{-S} dS α=[eS]τ=0(eτ)=eτ\alpha = \left[ -e^{-S} \right]_{\tau}^{\infty} = 0 - (-e^{-\tau}) = e^{-\tau}

Setting α=0.05\alpha = 0.05: eτ=0.05e^{-\tau} = 0.05 τ=ln(0.05)\tau = -\ln(0.05) τ2.9957\tau \approx \mathbf{2.9957}


2. Neyman-Pearson Theorem (Power)

We use τ2.9957\tau \approx 2.9957 to calculate the Probability of Detection (β\beta): β=PD=τf(SH1)dS\beta = P_{D} = \int_{\tau}^{\infty} f(S \mid H_1) dS β=2.99570.5e0.5SdS\beta = \int_{2.9957}^{\infty} 0.5 e^{-0.5S} dS β=[e0.5S]2.9957\beta = \left[ -e^{-0.5S} \right]_{2.9957}^{\infty} β=0(e0.5×2.9957)=e1.49785\beta = 0 - (-e^{-0.5 \times 2.9957}) = e^{-1.49785} β0.2236\beta \approx \mathbf{0.2236}


3. Bayesian Update (Posterior Probability)

We use Bayes' Rule for P(H1S=3)P(H_1 \mid S=3).

Given Values: P(H1)=0.001P(H0)=0.999P(H_1) = 0.001 \quad P(H_0) = 0.999 f(S=3H0)=e30.049787f(S=3 \mid H_0) = e^{-3} \approx 0.049787 f(S=3H1)=0.5e0.5×3=0.5e1.50.111565f(S=3 \mid H_1) = 0.5 e^{-0.5 \times 3} = 0.5 e^{-1.5} \approx 0.111565

Bayes' Rule: P(H1S)=f(SH1)P(H1)f(SH1)P(H1)+f(SH0)P(H0)P(H_1 \mid S) = \frac{f(S \mid H_1) P(H_1)}{f(S \mid H_1) P(H_1) + f(S \mid H_0) P(H_0)}

Calculation: P(H1S=3)=(0.111565)(0.001)(0.111565)(0.001)+(0.049787)(0.999)P(H_1 \mid S=3) = \frac{(0.111565)(0.001)}{(0.111565)(0.001) + (0.049787)(0.999)} P(H1S=3)=0.0001115650.000111565+0.049737213P(H_1 \mid S=3) = \frac{0.000111565}{0.000111565 + 0.049737213} P(H1S=3)0.0001115650.049848778P(H_1 \mid S=3) \approx \frac{0.000111565}{0.049848778} P(H1S=3)0.002238P(H_1 \mid S=3) \approx \mathbf{0.002238}

Despite the high score and alarm, the probability that a fire has actually occurred is only about 0.2238%. The initial very low prior probability (0.1%) heavily influences the result, illustrating the low base rate problem in rare event detection.

Question 5

Similar case-study can also include multiple sensors with AND, OR type fusion of decisions.