3 Introduction To Probability

Statistics I · Unit 3 · 8 hrs

Introduction to Probability

Exam-focused notes for Introduction to Probability (Statistics I, STA169): what the TU syllabus asks and how it has actually been tested, with 7 solved past questions from this unit.

Introduction to Probability in short

Probability gives a precise numerical language for uncertainty, and it underlies every statistical technique built in later chapters, from a single coin toss to the classifiers used in spam filtering.

Introduction to Probability: notes

Concepts of probability

An experiment (or trial) is any activity that produces an observable outcome, such as tossing a coin or picking a component off a production line. The sample space $S$ is the set of all possible outcomes of an experiment; tossing two coins gives $S={HH, HT, TH, TT}$. An event is any subset of the sample space. The exhaustive number of cases is the total number of possible outcomes, while the favourable number of cases is the number of outcomes belonging to the event of interest; for a single fair die, the exhaustive number of cases is 6 and the favourable number of cases for "an even number" is 3. Outcomes are mutually exclusive if the occurrence of one rules out the occurrence of the other (head and tail on one toss), and equally likely if each has the same chance of occurring. Two events are independent if the occurrence of one does not change the probability of the other (drawing a card, replacing it, then drawing again), and dependent otherwise (drawing a card and not replacing it before the second draw).

Definitions of probability

The classical (a priori) definition states that if an experiment has $n$ exhaustive, mutually exclusive, and equally likely outcomes, of which $m$ are favourable to an event $A$, then $P(A) = \dfrac{m}{n}$, and the probability of $A$ not happening is $P(\bar{A}) = \dfrac{n-m}{n} = 1-P(A)$. This definition fails when the outcomes are not equally likely or when $n$ is not finite. The empirical (relative frequency) definition instead defines probability as the limiting proportion of times an event occurs over a very large number of repetitions of the experiment, which does not require the outcomes to be equally likely. The axiomatic definition puts probability on a fully general footing: for any event $A$, $0 \le P(A) \le 1$, $P(S)=1$ for the whole sample space, and for mutually exclusive events the probability of their union is the sum of their individual probabilities.

What this unit covers

  • Concepts of probability
  • Definitions of probability
  • Laws of probability
  • Bayes theorem
  • prior and posterior probabilities
  • Problems and illustrative examples related to computer Science and IT

Concepts of probability

2080 · 5 marks

Define independent and mutually exclusive events. Three groups of children 2 boys and 2 girls, 3 boys and 1 girl, 1 boy and 3 girls respectively. One child is selected at random from each group. Find the probability of selecting one boy and two girls. [5]

  • Group 1: 2 boys, 2 girls (total 4) - Group 2: 3 boys, 1 girl (total 4) - Group 3: 1 boy, 3 girls (total 4) - One child selected at random from each group. - Required: $P(\text{1 boy and 2 girls})$ Mutually Exclusive Events: Two events cannot occur at the same time; occurrence of one excludes th...
Open this answer on its own page →

2079 · 5 marks

Define conditional probability. A problem of statistics is given to three students, A, B, and C whose chances of solving the problem are in a ratio of 2:3:5. Find the probability that (i) none of them solve the problem (ii) the problem will be solved. [5]

Conditional probability is the probability of an event $A$ occurring given that another event $B$ has already occurred. It is defined as: $$P(AB) = \frac{P(A \cap B)}{P(B)}, \quad P(B) 0$$ --- - Ratio of chances of solving: $A : B : C = 2 : 3 : 5$ - Sum of ratio parts: $2 + 3 + 5 = 10$ Interpreti...

Open this answer on its own page →

Bayes theorem

2080 · 5 marks

What is conditional probability? Three roads A, B and C lead away from a jail. A prisoner escaping from the jail selects a road at random. If road A is selected, the probability of escaping is 1/10. Similarly for road B it is 1/8 and for road C it is 1/5. i. What is the probability that the prisoner will succeed in escaping? ii. If the prisoner has succeeded in escaping, what is the probability that he had chosen the road A? [5]

Show solved answer

Conditional Probability and Prisoner Escape Problem

Given

  • Roads: A, B, C selected at random, so $P(A) = P(B) = P(C) = \dfrac{1}{3}$
  • $P(E \mid A) = \dfrac{1}{10}$
  • $P(E \mid B) = \dfrac{1}{8}$
  • $P(E \mid C) = \dfrac{1}{5}$

where $E$ = event of escaping.

Definition: Conditional Probability

Conditional probability is the probability of an event occurring given that another event has already occurred. For events $A$ and $B$:

$$P(A \mid B) = \frac{P(A \cap B)}{P(B)}, \quad P(B) > 0$$

Solution

Part (i): Probability of Escape

By the Theorem of Total Probability:

$$P(E) = P(A)P(E \mid A) + P(B)P(E \mid B) + P(C)P(E \mid C)$$

$$P(E) = \frac{1}{3}\cdot\frac{1}{10} + \frac{1}{3}\cdot\frac{1}{8} + \frac{1}{3}\cdot\frac{1}{5}$$

$$P(E) = \frac{1}{3}\left(\frac{1}{10} + \frac{1}{8} + \frac{1}{5}\right)$$

LCM of $10, 8, 5 = 40$:

$$\frac{1}{10} + \frac{1}{8} + \frac{1}{5} = \frac{4 + 5 + 8}{40} = \frac{17}{40}$$

$$P(E) = \frac{1}{3}\cdot\frac{17}{40} = \frac{17}{120} \approx 0.1417$$

Part (ii): Probability Road A Chosen Given Escape

By Bayes' Theorem:

$$P(A \mid E) = \frac{P(A)P(E \mid A)}{P(E)} = \frac{\frac{1}{3}\cdot\frac{1}{10}}{\frac{17}{120}} = \frac{\frac{1}{30}}{\frac{17}{120}}$$

$$P(A \mid E) = \frac{1}{30}\times\frac{120}{17} = \frac{120}{510} = \frac{4}{17} \approx 0.2353$$

Summary

Road$P(\cdot)$$P(E\mid\cdot)$Product
A1/31/104/120
B1/31/85/120
C1/31/58/120
Total17/120
  • $P(\text{escape}) = \dfrac{17}{120} \approx 0.142$
  • $P(A \mid \text{escape}) = \dfrac{4}{17} \approx 0.235$
Open this answer on its own page →

2079 · 5 marks

A factory has three machines M1, M2, and M3 producing a large number of computer chips. Of the total daily production of items, 50% is produced on M1, 20% on M2, and 30% on M3. Records show that 4% of chips produced on M1 are defective, 2% produced of chips produced on M2 are defective and 2.5% of chips produced on M3 are defective. The occurrence of a defective chip is independent of all other chips. One chip is chosen at random from a day's total production. (i) Show that the probability of being defective is 0.0315 (ii) Given that it is defective, find the probability that was produced on machine M1. [5]

Machine Production Share Defective Rate ------------------------------------------ M1 $P(M1) = 0.50$ $P(DM1) = 0.04$ M2 $P(M2) = 0.20$ $P(DM2) = 0.02$ M3 $P(M3) = 0.30$ $P(DM3) = 0.025$ Let $D$ = event that a randomly chosen chip is defective. --- By the Total Probability Theorem: $$P(D) = P(M1)P...

Open this answer on its own page →

2076 · 5 marks

A manufacturing company employs three analytical plans for the design and development of a particular product. For cost reasons, all three are used at varying times. In fact, plan 1, 2, and 3 are used for 30%, 20% and 50% of the products respectively. The defect rate in different procedures is as follows: $P(D/P_1) = 0.01$, $P(D/P_2) = 0.03$, $P(D/P_3) = 0.02$, where $P(D/P_j)$ is the probability of a defective product, given plan $j$. If a random product was observed and found to be defective, which plan was most likely used and thus responsible? [5]

Plan Prior $P(Pj)$ Defect Rate $P(D/Pj)$ ------------------ $P1$ 0.30 0.01 $P2$ 0.20 0.03 $P3$ 0.50 0.02 Find: posterior $P(Pj/D)$ for each plan; identify the largest. $$P(D) = (0.30)(0.01) + (0.20)(0.03) + (0.50)(0.02)$$ $$P(D) = 0.003 + 0.006 + 0.010 = 0.019$$ $$P(Pj/D) = \frac{P(Pj),P(D/Pj)}{...

Open this answer on its own page →

2080.1 · 5 marks

Define Baye's theorem. Store A, B and C have 100, 75 and 50 employees and, respectively 70, 60 and 50 percent of these are women. Registration are equally likely among all employees regardless of sex. One employee resigns, and this is woman. What is the probability that she works in store B? [5]

Show solved answer

Bayes' Theorem - Definition and Application

Given

StoreEmployees% WomenWomen Count
A10070%70
B7560%45
C5050%25
Total225140

Resignations equally likely among all employees. Observed event: the resigning employee is a woman. Find $P(\text{Store B} \mid \text{Woman})$.

Definition of Bayes' Theorem

If $B_1, B_2, \dots, B_n$ are mutually exclusive and exhaustive events with $P(B_i) > 0$, and $A$ is any event with $P(A) > 0$, then:

$$P(B_i \mid A) = \frac{P(B_i), P(A \mid B_i)}{\sum_{j=1}^{n} P(B_j), P(A \mid B_j)}$$

  • $P(B_i)$ = prior probability
  • $P(A \mid B_i)$ = likelihood
  • $P(B_i \mid A)$ = posterior probability

Solution

Define Events

  • $S_A, S_B, S_C$ = employee works in Store A, B, C
  • $W$ = resigning employee is a woman

Prior Probabilities (equal likelihood over 225 employees)

$$P(S_A) = \frac{100}{225}, \quad P(S_B) = \frac{75}{225}, \quad P(S_C) = \frac{50}{225}$$

Likelihoods

$$P(W \mid S_A) = 0.70, \quad P(W \mid S_B) = 0.60, \quad P(W \mid S_C) = 0.50$$

Total Probability of a Woman Resigning

$$P(W) = \frac{100}{225}(0.70) + \frac{75}{225}(0.60) + \frac{50}{225}(0.50)$$

$$P(W) = \frac{70 + 45 + 25}{225} = \frac{140}{225}$$

Apply Bayes' Theorem

$$P(S_B \mid W) = \frac{P(S_B), P(W \mid S_B)}{P(W)} = \frac{\dfrac{75}{225}(0.60)}{\dfrac{140}{225}} = \frac{45}{140}$$

$$\boxed{P(S_B \mid W) = \frac{45}{140} = \frac{9}{28} \approx 0.3214 \approx 32.14%}$$

Conclusion

The probability that the resigning woman works in Store B is approximately 0.3214 (32.14%).

Open this answer on its own page →

Laws of probability

2080.1 · 5 marks

Define mutually exclusive events and independent events in probability. A problem of mathematics is given to three students, A, B and C whose chances of solving the problem are in ratio 2 : 3 : 5. Find the probability that (i) all of them solve the problem (ii) none of them solve the problem (iii) the problem will be solved. [5]

  • Chances (probabilities) of solving the problem for A, B, C are in ratio $2 : 3 : 5$. - Total ratio parts $= 2 + 3 + 5 = 10$. Individual probabilities: $$P(A) = \frac{2}{10} = \frac{1}{5}, \quad P(B) = \frac{3}{10}, \quad P(C) = \frac{5}{10} = \frac{1}{2}$$ Mutually Exclusive Events: Two events ...
Open this answer on its own page →