Probability & statistics · every question solved

CSC211 Tutorial Sheet Solutions

Every question on the CSC211 tutorial sheet, solved step by step. Before each solution, a short box shows you how to recognise the type of problem and which tool to reach for.

57 min read 48 questions
counting outcomes 4/7 · 5/9 µ x P = 0.34 the shaded area is the answer

What is inside

Part A · Probability
  1. 1Sample spaces
  2. 2Events as subsets
  3. 3Unions, intersections, complements
  4. 4The addition rule
  5. 5Counting a random draw
  6. 6One fair die
  7. 7Conditional probability: two dice
  8. 8Two-way tables
  9. 9Total probability and Bayes
  10. 10Drawing without replacement
  11. 11Venn diagrams
  12. 12Counting octal numbers
  13. 13Lottery odds (hypergeometric)
  14. 14Joint and conditional from a table
  15. 15Independent safety systems
  16. 16Imperfect tests (Bayes) 🔒
  17. 17Dartboard: independent throws 🔒
  18. 18Tree diagrams 🔒
  19. 19System reliability 🔒
  20. 20Permutations and combinations 🔒
  21. 21Bit strings as outcomes 🔒
  22. 22Subsets of a sample space 🔒
  23. 23Conditional probability: sums of dice 🔒
Part A · Random variables
  1. 24Expectation and the CDF 🔒
  2. 25Proving the variance formula 🔒
  3. 26Distorted bits and the binomial 🔒
  4. 27Defectives without replacement 🔒
  5. 28Densities with an unknown constant 🔒
  6. 29Mean and variance of aX + b 🔒
  7. 30Binomial: impure wells 🔒
  8. 31A binomial on top of a binomial 🔒
  9. 32The geometric distribution 🔒
  10. 33Poisson approximation 🔒
  11. 34The normal distribution 🔒
  12. 35Means and variances of the common distributions 🔒
Part B · Distributions and joint variables
  1. B26Binomial: the shock test 🔒
  2. B27Binomial ranges and Chebyshev 🔒
  3. B28Repeat of Question 31 🔒
  4. B29Geometric: the first defective 🔒
  5. B30Poisson: the particle counter 🔒
  6. B31Poisson: tankers turned away 🔒
  7. B32Repeat of Question 33 🔒
  8. B33aX + b for a density 🔒
  9. B34(blank on the sheet)
  10. B35Joint probability function 🔒
  11. B36Joint density over a square 🔒
  12. B37Joint density over a triangle 🔒
  13. B38Independent exponential lifetimes 🔒
  14. B39Combined mean 🔒
How to use this book

Each question has a yellow box first. That box tells you how to recognise the type of problem and which tool to use. Read it before the solution. If you can explain the yellow box in your own words, you can solve any problem of the same type.

Every blue box gives the question word for word as it is on the original sheet, including its typing mistakes. Part B questions keep their sheet numbers, with a “B” in front.

The sheet has some typing mistakes and missing parts. Where an assumption was needed, the solution says so clearly. The sheet also numbers questions 1 to 35 and then starts again at 26: the first group is Part A and the second group is Part B.

Free to read

Every question and every “how to think about it” box is free. The worked solutions to questions 1 to 15 are free too. The other 33 unlock for 200 FCFA, or for free when 3 classmates start reading through your link.

Key formulas used everywhere
  • Equally likely outcomes: P(E)=number of outcomes in Enumber of outcomes in SP(E) = \dfrac{\text{number of outcomes in } E}{\text{number of outcomes in } S}
  • Complement: P(Aˉ)=1−P(A)P(\bar A) = 1 - P(A)
  • Addition rule: P(A∪B)=P(A)+P(B)−P(A∩B)P(A \cup B) = P(A) + P(B) - P(A \cap B)
  • Conditional probability: P(A∣B)=P(A∩B)P(B)P(A \mid B) = \dfrac{P(A \cap B)}{P(B)}
  • Independence: P(A∩B)=P(A) P(B)P(A \cap B) = P(A)\,P(B)
  • Total probability: P(B)=∑iP(B∣Ai)P(Ai)P(B) = \sum_i P(B \mid A_i)P(A_i)
  • Bayes: P(Ai∣B)=P(B∣Ai)P(Ai)P(B)P(A_i \mid B) = \dfrac{P(B \mid A_i)P(A_i)}{P(B)}
1

Sample spaces

Part A · Question 1

Question 1

Find the sample spaces of the following experiments

i) I attempt to sign up to AOL from my phone – to do so successfully the local phone number must be working and AOL's network must be working.

ii) Online, I attempt to access a web page and record the time required to receive and display it (in seconds).

iii) On a network, there are two possible routes a message can take to a destination – in order for a message to get to the recipient, one of the routes and the recipient's computer must be up.

How to think about it

A sample space SS is the list of every possible outcome of the experiment. Ask: "What are the separate things that can each be up or down?" If there are kk things with 2 states each, there are 2k2^k outcomes. If the outcome is a measurement (time, length), the sample space is an interval of real numbers, not a list.

Solution

Write uu = up (working), dd = down.

(i) Two things: phone line and network. Outcome = (phone, network).

S={(u,u), (u,d), (d,u), (d,d)}(22=4 outcomes)S = \{(u,u),\ (u,d),\ (d,u),\ (d,d)\} \qquad (2^2 = 4 \text{ outcomes})

(ii) Time can be any non-negative real number: S=[0,∞)={t:t≥0}S = [0, \infty) = \{t : t \ge 0\}.

(iii) Three things: route 1, route 2, recipient's computer. Outcome = (R1,R2,C)(R_1, R_2, C).

S={uuu, uud, udu, udd, duu, dud, ddu, ddd}(23=8 outcomes)S = \{uuu,\ uud,\ udu,\ udd,\ duu,\ dud,\ ddu,\ ddd\} \qquad (2^3 = 8 \text{ outcomes})
2

Events as subsets

Part A · Question 2

Question 2

With the same exercises as before, define the following events

i) A = fail to log on ; B = AOL network down

ii) C = at least 0s required

iii) D = message gets through;

How to think about it

An event is a subset of the sample space. Go through each outcome in SS and ask "does the statement hold here?" Keep the ones where the answer is yes.

Solution

(i) Log on succeeds only at (u,u)(u,u). So failure is everything else:

A={(u,d), (d,u), (d,d)},B={(u,d), (d,d)}A = \{(u,d),\ (d,u),\ (d,d)\}, \qquad B = \{(u,d),\ (d,d)\}

(The network is the second entry.)

(ii) Every time is at least 0 s, so C=[0,∞)=SC = [0,\infty) = S. This is the certain event.

(iii) The message gets through when the computer is up and at least one route is up:

D={uuu, udu, duu}D = \{uuu,\ udu,\ duu\}
3

Unions, intersections, complements

Part A · Question 3

Question 3

a. Using exercise 1ii) with A, B, C and D the following events: A = [00, 200), B = [150, ∞), C = [200, ∞) and D = [50, 75]. find

i) A ∪ B, A ∪ C, A ∪ D.

ii) A ∩ B, A ∩ D

b. A ∩ B of 2i) above

c. Let D be the event that message gets through, find D̄

How to think about it

Union (∪\cup) = "in at least one of them": put the sets together. Intersection (∩\cap) = "in both": keep only the overlap. Complement (Dˉ\bar D) = everything in SS that is not in DD. For intervals, draw a number line and mark each interval. Watch the brackets: [ includes the end point, ) does not.

Solution

(a)(i)

A∪B=[0,200)∪[150,∞)=[0,∞)=SA \cup B = [0,200) \cup [150,\infty) = [0,\infty) = S A∪C=[0,200)∪[200,∞)=[0,∞)=SA \cup C = [0,200) \cup [200,\infty) = [0,\infty) = S

(200 is missing from AA, but it is in CC.)

A∪D=[0,200)=Abecause D=[50,75] lies inside AA \cup D = [0,200) = A \quad \text{because } D = [50,75] \text{ lies inside } A

(ii) A∩B=[150,200)A \cap B = [150, 200) and A∩D=[50,75]=DA \cap D = [50, 75] = D.

(b) From 2(i): A={(u,d),(d,u),(d,d)}A = \{(u,d),(d,u),(d,d)\} and B={(u,d),(d,d)}B = \{(u,d),(d,d)\}. Both outcomes of BB are in AA, so

A∩B={(u,d), (d,d)}=BA \cap B = \{(u,d),\ (d,d)\} = B

This makes sense: if the network is down you must fail to log on.

(c) D={uuu,udu,duu}D = \{uuu, udu, duu\}, so Dˉ={uud, udd, dud, ddu, ddd}\bar D = \{uud,\ udd,\ dud,\ ddu,\ ddd\}: the message does not get through.

4

The addition rule

Part A · Question 4

Question 4

Considering experiment 1i), if

P(phone up ) = 0.9
P(network up) = 0.6
P(phone up, network up) = 0.55

Find P(phone up or network up)

How to think about it

The word "or" means union. Use the addition rule. You must subtract the "both" part because it was counted twice.

Solution

P(phone∪network)=0.9+0.6−0.55=0.95P(\text{phone} \cup \text{network}) = 0.9 + 0.6 - 0.55 = \mathbf{0.95}
5

Counting a random draw

Part A · Question 5

Question 5

A box contains 4 chips, 1 of them is defective. Person draws one chip at random.

i) What is the probability that the person draws the defective chip?

ii) If the person draws two chips, what is the probability that the defective chip is among them?

How to think about it

Random draw means all chips are equally likely, so count. For "is among them" it is often easier to find the opposite ("not among them") and subtract from 1.

Solution

(i) P=14=0.25P = \tfrac14 = 0.25

(ii) Ways to pick 2 chips from 4: (42)=6\binom42 = 6. Ways to pick 2 from the 3 good chips: (32)=3\binom32 = 3.

P(defective among them)=1−36=12P(\text{defective among them}) = 1 - \frac36 = \frac12

Check by direct count: pick the defective one (1 way) and one good chip (3 ways) gives 3/6=1/23/6 = 1/2.

6

One fair die

Part A · Question 6

Question 6

A fair die is rolled, what is the probability that

a) We obtain a 7?
b) We do not get a 1?
c) We get a 1 or a 3?

How to think about it

S={1,2,3,4,5,6}S = \{1,2,3,4,5,6\}, each with probability 1/61/6. Count the outcomes in the event. An outcome that is not in SS has probability 0. "Not" means complement. "Or" for outcomes that cannot happen together means just add.

Solution

(a) 7 is not in SS: P=0P = 0.

(b) 1−16=561 - \tfrac16 = \tfrac56

(c) 16+16=13\tfrac16 + \tfrac16 = \tfrac13

7

Conditional probability: two dice

Part A · Question 7

Question 7

A fair die is rolled twice. Let A be the event of getting a sum of 8 and B be the event of getting a sum at most 10

a) Find P(A)

b) Find P(A/B)

How to think about it

Two dice give 6×6=366 \times 6 = 36 equally likely pairs. List the pairs for the event. For a conditional probability, the new sample space is BB: count how many outcomes of BB are also in AA, then divide by the size of BB.

Solution

(a) A={(2,6),(3,5),(4,4),(5,3),(6,2)}A = \{(2,6), (3,5), (4,4), (5,3), (6,2)\}, so P(A)=536≈0.139P(A) = \dfrac{5}{36} \approx 0.139.

(b) Sums greater than 10: (5,6),(6,5),(6,6)(5,6), (6,5), (6,6), 3 outcomes. So BB has 36−3=3336 - 3 = 33 outcomes. Every outcome of AA (sum 8) is in BB, so A∩B=AA \cap B = A.

P(A∣B)=P(A∩B)P(B)=5/3633/36=533≈0.152P(A \mid B) = \frac{P(A \cap B)}{P(B)} = \frac{5/36}{33/36} = \frac{5}{33} \approx 0.152
8

Two-way tables

Part A · Question 8

Question 8

A university has 600 freshmen, 500 sophomores and 400 juniors. 80 of the freshmen, 60 of the sophomores, and 50 of the juniors are Computer Science (CSC) majors.

a) What is the probability that a student selected at random is a freshman or an CSC major (or both)?

b) If a student is a CSC major, what is the probability that he/she is a sophomore?

How to think about it

Put the numbers in a table first. Then every probability is just (count in the cell or group) divided by (the right total). For "given", the total changes to the size of the given group.

Solution

Fresh.Soph.JuniorTotal
CSC806050190
Not CSC5204403501310
Total6005004001500

(a)

P(F∪C)=P(F)+P(C)−P(F∩C)=600+190−801500=7101500=71150≈0.473P(F \cup C) = P(F) + P(C) - P(F \cap C) = \frac{600 + 190 - 80}{1500} = \frac{710}{1500} = \frac{71}{150} \approx 0.473

(b)

P(Soph∣C)=60190=619≈0.316P(\text{Soph} \mid C) = \frac{60}{190} = \frac{6}{19} \approx 0.316
9

Total probability and Bayes

Part A · Question 9

Question 9

A Microsoft's internet explorer (IE) and Mozilla Firefox (MF) are two popular web browsers. IE support certain features that are present at a given site, such a security, that MF does not support and vice versa. Assume that all features on all sites are exploitable by either IE or MF. The probability that IE supports a given feature is 1 – δ and the probability that the MF fail to support a feature is δ.

a. A user selects a browser at random and attempts to assess it. What is the probability that the user will be forced to change the browser?

b. Given that the browser fails to assess a site, what is the probability that it is IE?

How to think about it

Two stages: first choose a browser (probability 12\tfrac12 each), then it works or fails. Stage problems use the total probability rule for the overall chance of failure. The "given it failed, which browser was it?" question reverses the order, so use Bayes.

Solution

As the question is written, P(fail∣IE)=1−(1−δ)=δP(\text{fail} \mid IE) = 1 - (1 - \delta) = \delta and P(fail∣MF)=δP(\text{fail} \mid MF) = \delta.

(a) The user must change when the chosen browser fails:

P(fail)=12⋅δ+12⋅δ=δP(\text{fail}) = \tfrac12 \cdot \delta + \tfrac12 \cdot \delta = \delta

(b)

P(IE∣fail)=P(fail∣IE) P(IE)P(fail)=12δδ=12P(IE \mid \text{fail}) = \frac{P(\text{fail} \mid IE)\,P(IE)}{P(\text{fail})} = \frac{\tfrac12\delta}{\delta} = \frac12

General version. If your lecturer meant two different failure rates, say P(fail∣IE)=aP(\text{fail} \mid IE) = a and P(fail∣MF)=bP(\text{fail} \mid MF) = b, the same method gives P(fail)=a+b2P(\text{fail}) = \dfrac{a+b}{2} and P(IE∣fail)=aa+bP(IE \mid \text{fail}) = \dfrac{a}{a+b}.

10

Drawing without replacement

Part A · Question 10

Question 10

A batch of 25 injection-molded parts contains 5 that have suffered excessive shrinkage. If two parts are selected at random, without replacement, what is the probability that the second part selected is one with excessive shrinkage?

How to think about it

We are not told what the first part was, so split on the two cases for the first part (bad or good) and add them up. This is the total probability rule. Tip: when you know nothing about the earlier draws, the answer always equals the simple fraction (here 5/255/25).

Solution

Let S1,S2S_1, S_2 = first, second part has shrinkage.

P(S2)=P(S2∣S1)P(S1)+P(S2∣Sˉ1)P(Sˉ1)=424⋅525+524⋅2025=20+100600=15=0.2P(S_2) = P(S_2 \mid S_1)P(S_1) + P(S_2 \mid \bar S_1)P(\bar S_1) = \frac{4}{24}\cdot\frac{5}{25} + \frac{5}{24}\cdot\frac{20}{25} = \frac{20 + 100}{600} = \frac15 = 0.2
11

Venn diagrams

Part A · Question 11

Question 11

Out of a group of 100 students, 30 have laptop, 50 have a computer (desktop or laptop) of their own and 90 have access to a computer lab. One student is picked at random. By using a Venn diagram, what is the probability that he/she

a) has a computer but not a laptop?

b) has access to a lab and a computer of his/her own?

c) does have a laptop or a computer?

How to think about it

First see how the sets sit: every laptop is a computer, so the laptop circle is inside the computer circle. Then fill in counts region by region. For two overlapping sets use ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A \cup B| = |A| + |B| - |A \cap B|.

Solution

100 students Computer (50) Lab (90) Laptop (30) 10 40 50
Computer only: 10. Computer and Lab: 40. Lab only: 50. The laptop group of 30 sits inside the Computer circle. These counts use the assumption explained in part (b).

(a) Computer but no laptop: 50−30=2050 - 30 = 20. P=0.20P = 0.20

(b) The sheet does not give the overlap directly. Take the usual assumption that every student has at least one of the two (own computer or lab access), so the union is 100:

∣Lab∩Comp∣=90+50−100=40,P=0.40|\text{Lab} \cap \text{Comp}| = 90 + 50 - 100 = 40, \qquad P = 0.40

(Without that assumption, the overlap is somewhere between 40 and 50, so 0.40≤P≤0.500.40 \le P \le 0.50.)

(c) Laptop owners are already computer owners, so "laptop or computer" = "computer": P=50100=0.50P = \tfrac{50}{100} = 0.50

12

Counting octal numbers

Part A · Question 12

Question 12

Find the probability that a randomly chosen five digit number is a valid octal number.

How to think about it

Octal numbers use only the digits 0 to 7. Count position by position (multiplication rule). Remember a five digit number cannot start with 0.

Solution

Five digit numbers run from 10000 to 99999: 9×104=90 0009 \times 10^4 = 90\,000 numbers.

Valid octal ones: first digit from 1 to 7 (7 choices), each of the other four digits from 0 to 7 (8 choices): 7×84=28 6727 \times 8^4 = 28\,672.

P=28 67290 000=17925625≈0.3186P = \frac{28\,672}{90\,000} = \frac{1792}{5625} \approx 0.3186

Note. If leading zeros are allowed (any string of 5 digits), then P=(8/10)5=0.3277P = (8/10)^5 = 0.3277.

13

Lottery odds (hypergeometric)

Part A · Question 13

Question 13

Powerball. Pick five (different) numbers out of 49 – the lottery will also draw five numbers. You win if at least three of the numbers are right.

i) What is the probability to have five matching numbers?

ii) What is the probability to have exactly three matching numbers?

iii) What is the probability to win?

How to think about it

Order does not matter, so use combinations. For "exactly kk matches": choose kk of the 5 winning numbers and choose the remaining 5−k5-k from the 44 losing numbers. Divide by all possible tickets. This pattern is called the hypergeometric distribution. "At least 3" means add the cases 3, 4 and 5.

Solution

Total tickets: (495)=1 906 884\binom{49}{5} = 1\,906\,884.

(i)

P(5)=(55)(440)(495)=11 906 884≈5.24×10−7P(5) = \frac{\binom55\binom{44}{0}}{\binom{49}{5}} = \frac{1}{1\,906\,884} \approx 5.24 \times 10^{-7}

(ii)

P(3)=(53)(442)(495)=10×9461 906 884=94601 906 884≈0.00496P(3) = \frac{\binom53\binom{44}{2}}{\binom{49}{5}} = \frac{10 \times 946}{1\,906\,884} = \frac{9460}{1\,906\,884} \approx 0.00496

(iii) P(4)=(54)(441)(495)=2201 906 884P(4) = \dfrac{\binom54\binom{44}{1}}{\binom{49}{5}} = \dfrac{220}{1\,906\,884}. So

P(win)=9460+220+11 906 884=96811 906 884≈0.00508P(\text{win}) = \frac{9460 + 220 + 1}{1\,906\,884} = \frac{9681}{1\,906\,884} \approx 0.00508
14

Joint and conditional from a table

Part A · Question 14

Question 14

Lot of unmarked Pentium III chips in box is as follows

400 mH500mHTotal
Good480490970
Defective201030
Total5005001000

i) Drawing a chip t random, what are the different possibilities?

ii) If you have the partial information that the chip selected is 400mH chip. What is the probability that it is defective?

How to think about it

A two-way table gives joint probabilities: each cell divided by the grand total. For "given", shrink to the row or column you are told about and divide by its total.

Solution

(i) Four possible outcomes:

OutcomeCountProbability
400 MHz and good4800.48
400 MHz and defective200.02
500 MHz and good4900.49
500 MHz and defective100.01

(ii)

P(defective∣400)=20500=0.04(same as 0.02/0.5)P(\text{defective} \mid 400) = \frac{20}{500} = 0.04 \qquad (\text{same as } 0.02/0.5)
15

Independent safety systems

Part A · Question 15

Question 15

Safety system at a nuclear reactor. Suppose there re two physically separate safety systems A and B in a molecular rector. An "incident can occur only when both of them fail in the event of a problem. Suppose the probabilities for the systems to fail in the event of a problem are: P(A fails) = 10-4 p(B fails) = 10-8. What is the probability for n event to occur?

How to think about it

"Physically separate" tells you the systems are independent. "Both" means intersection. For independent events, multiply.

Solution

P(incident)=P(A fails)×P(B fails)=10−4×10−8=10−12P(\text{incident}) = P(A \text{ fails}) \times P(B \text{ fails}) = 10^{-4} \times 10^{-8} = 10^{-12}
16

Imperfect tests (Bayes)

Part A · Question 16 · Locked solution

Question 16

Given lot of chips contains 2% of defective chips. Each chip is tested before delivery. However, the tester is not wholly reliable:

p("tester sys chip is good" | "chip is good" ) = 0.95

p("tester sys chip is defective "| " chip is defective") = 0.94

find the probability that chip selected t random is defective.

How to think about it

This is the classic "imperfect test" setup. There is a prior (2% defective) and a test with known accuracy. The useful questions are: how often does the tester say "defective" (total probability), and when it says so, how often is it right (Bayes). Draw a tree: first branch = true state, second branch = what the tester says.

Solution

17

Dartboard: independent throws

Part A · Question 17 · Locked solution

Question 17

Very simple Dartboard: it is a board divided into 9 squares with one painted red and the others grey. We will assume that only those darts counts that actually hit the dartboard. If player throws dart and hits the board at random, the probability to hit the red one will be directly proportional to the red area. A player now throws three darts, one after the other. Find the sample space and the probabilities of each elementary event.

How to think about it

One throw: probability is proportional to area, so P(R)=1/9P(R) = 1/9 and P(G)=8/9P(G) = 8/9. Three throws are independent, so an outcome is a sequence of three letters and its probability is the product of the three single-throw probabilities. Always check that all the probabilities add to 1.

Solution

18

Tree diagrams

Part A · Question 18 · Locked solution

Question 18

One bag contains 4 white memory sticks and 3 black memory sticks and a second bag contains 3 white memory sticks and 5 black memory sticks. One memory stick is drawn from the first bag and placed unseen in the second bag. With the help of a tree diagram, find the probability that a memory stick drawn from the second bag is black?

How to think about it

Two stages, and the second stage depends on the first. Draw the tree: first branch is the colour moved, second branch is the colour drawn. Multiply along each path, then add the paths that end in "black".

Solution

19

System reliability

Part A · Question 19 · Locked solution

Question 19

An electrical system consist of four components as illustrated below. The system works if components A and B work and either of the components C and D work. The reliability (probability of working) of each component is also shown. Find the probability that (a) the entire system works and (b) the component C does not work, given that the entire system works. Assume the four components work independently.

A B C D 0.80.90.80.8 in out
How to think about it

Series parts (one after the other) must all work: multiply. Parallel parts need at least one to work: use 1−P(all fail)1 - P(\text{all fail}). For the conditional part, write the top as "C fails and system works" and think about what else must be true for that to happen.

Solution

20

Permutations and combinations

Part A · Question 20 · Locked solution

Question 20

There are 12 marbles in an urn. 8 are white and 4 are red. The white marbles are numbered w1, w2, ···, w8 and the red ones are numbered r1, r2, r3, r4. For (a) - (d): Without looking into the urn you draw out 5 marbles.

(a) How many unique choices can you get if order matters?

(b) How many unique choices can you get if order does not matter?

(c) How many ways can you choose 3 white marbles and 2 red marbles if order matters?

(d) How many ways can you choose 3 white marbles and 2 red marbles if order does not matter?

(e) How many marbles =....=........must you draw to be sure of getting two red ones?

2. A printed circuit board has eight different locations in which a component can be placed. If five identical components are to be placed on the board, how many different designs are possible?

How to think about it

Ask one question first: does order matter? Yes: permutations nPr=n!(n−r)!{}^nP_r = \dfrac{n!}{(n-r)!}. No: combinations (nr)=n!r!(n−r)!\binom nr = \dfrac{n!}{r!(n-r)!}. When choosing from two groups, choose from each group and multiply. To turn an unordered choice of 5 items into ordered ones, multiply by 5!5!. For "to be sure", think of the worst possible luck. Identical objects in different places: only the set of places matters, so combinations.

Solution

21

Bit strings as outcomes

Part A · Question 21 · Locked solution

Question 21

Four bits are transmitted over a digital communications channel. Each bit is either distorted or received without distortion. Let Ai denote the event that the ith bit is distorted, i = 1, 2, 3, 4.

(a) Describe the sample space.

(b) What is the event A1?

(c) What is the event A1 ∪ A2?

(c) What is the event A1 ∩ A2?

(d) What is the event A1c?

How to think about it

Write each outcome as a string of 4 letters, one per bit. With 2 choices per bit there are 24=162^4 = 16 strings. An event like A1A_1 fixes one position and leaves the others free, so count the free positions.

Solution

22

Subsets of a sample space

Part A · Question 22 · Locked solution

Question 22

We roll 1 die and obtain one of the numbers 1 through 6 with equal probability.

(a) What is the probability that we obtain a 7?

(b) What is the probability that we do NOT get a 1?

(c) What is the probability that we get a 1 or a 3?

(d) If E = {1, 4, 5, 6} , and E ⊆ G, what might the event G be?

How to think about it

Parts (a) to (c) are the same as Question 6. For (d), E⊆GE \subseteq G means every element of EE is also in GG, so GG is EE plus possibly some extra outcomes from SS.

Solution

23

Conditional probability: sums of dice

Part A · Question 23 · Locked solution

Question 23

Let A be the event of getting 8 on the roll of two dice. Let B be the event that the sum of the two dice is greater than 6.

(a) The Find P (A)

(b) Find P (A|B)

How to think about it

Same method as Question 7. Know the count for each sum: sums 2 to 12 have 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1 ways.

Solution

24

Expectation and the CDF

Part A · Question 24 · Locked solution

Question 24

The probability mass function f of X, the number of imperfections per 10m of a synthetic fabric in continuous rolls of uniform width, is given by

x01234
f(x)0.410.370.160.050.01

i) Find the expectation of x, E(X)

ii) Find the probability distribution function of X

How to think about it

For a discrete variable: E(X)=∑xf(x)E(X) = \sum x f(x) (each value times its probability, then add). The distribution function is F(x)=P(X≤x)F(x) = P(X \le x), a running total of the probabilities. It is a step function that ends at 1.

Solution

25

Proving the variance formula

Part A · Question 25 · Locked solution

Question 25

Show that the variance of a random variable X is σ2 = E(X2) − µ2.

How to think about it

Start from the definition σ2=E[(X−μ)2]\sigma^2 = E[(X - \mu)^2], expand the square, and use two facts: expectation is linear, and μ\mu is a constant so E(μ)=μE(\mu) = \mu and E(μX)=μE(X)E(\mu X) = \mu E(X).

Solution

26

Distorted bits and the binomial

Part A · Question 26 · Locked solution

Question 26

(i) In the transmission of digital information, the probability that a bit has high, moderate or low distortion is 0.01, 0.04, and 0.95 respectively. Suppose that 3 bits are transmitted and that the amount of distortion of each bit is assumed to be independent.

  • What is the probability that two bits have high distortion and one has moderate distortion?
  • What is the probability that all three bits have low distortion?

Let X denote the number of bits with high distortion out of the three transmitted.

Determine The probability distribution, mean and variance of X

How to think about it

Independent bits: multiply. But if the question does not say which bit is which, also count the number of arrangements. When you count how many of nn independent trials are a "success" with the same probability pp, that count is Binomial(n,pn, p): P(X=x)=(nx)px(1−p)n−xP(X = x) = \binom nx p^x (1-p)^{n-x}, mean npnp, variance np(1−p)np(1-p).

Solution

27

Defectives without replacement

Part A · Question 27 · Locked solution

Question 27

a. A shipment of 8 similar microcomputers to a retail outlet contains 3 that are defective. If a school makes a random purchase of 2 of these computers, find the probability distribution for the number of defectives using permutations.

How to think about it

Sampling without replacement from a group with two types. Let XX = number of defectives, which can be 0, 1 or 2. "Using permutations" means count ordered picks: the total is 8P2{}^8P_2, and for each xx count the ordered ways to get it. (Combinations give the same answer.)

Solution

28

Densities with an unknown constant

Part A · Question 28 · Locked solution

Question 28

Suppose that the error in the reaction temperature, in °C, for a controlled laboratory experiment is a continuous random variable X having the probability density function f(x) = Find a then, find

i) P(0 < X ≤ 1)

ii) Suppose that Y = 2X2 +1. Find E(Y)

[The formula after "f(x) =" is blank on the original sheet.]

How to think about it

A density must have total area 1. That one equation gives the unknown constant. A probability is the area under ff between the limits. For the expectation of a function, E[g(X)]=∫g(x)f(x) dxE[g(X)] = \int g(x) f(x)\,dx, and linearity lets you write E(2X2+1)=2E(X2)+1E(2X^2 + 1) = 2E(X^2) + 1.

Solution

29

Mean and variance of aX + b

Part A · Question 29 · Locked solution

Question 29

Given that the pmf of a random variable X is as follows

x0123
f(x)1/41/81/21/8

Find the mean and variance of the random variable 2X + 3.

How to think about it

Do not build a new table for 2X+32X + 3. Find E(X)E(X) and Var(X)\text{Var}(X) first, then use the rules E(aX+b)=aE(X)+bE(aX + b) = aE(X) + b and Var(aX+b)=a2 Var(X)\text{Var}(aX + b) = a^2\,\text{Var}(X). Adding a constant shifts the mean but does not change the spread.

Solution

30

Binomial: impure wells

Part A · Question 30 · Locked solution

Question 30

it is conjectured that an impurity exists in 30% of all drinking wells in a certain rural community. In order to gain some insight on this problem, it is determined that some tests should be made. It is too expensive to test all the many wells in the area so 10 were randomly selected for testing.

a) Using binomial distribution what is the probability that exactly three wells have the impurity assuming that the conjecture is correct?

b) What is the probability that more than three wells are impure?

How to think about it

Fixed number of trials (n=10n = 10), each one yes or no, same probability (p=0.3p = 0.3), independent: Binomial. "More than 3" has many cases (4 to 10), so use the complement: 1−P(X≤3)1 - P(X \le 3).

Solution

31

A binomial on top of a binomial

Part A · Question 31 · Locked solution

Question 31

A large chain retailer purchases a certain kind of electronic device from a manufacturer. The manufacturer indicates that the defective rate of the device is 3%.

a. The inspector of the retailer randomly picks 20 items from a shipment. What is the probability that there will be at least one defective item among these 20?

b. Suppose that the retailer receives 10 shipments in a month and the inspector randomly tests 20 devices per shipment. What is the probability that there will be 3 shipments containing at least one defective device?

How to think about it

"At least one" almost always means 1−P(none)1 - P(\text{none}). Part (b) is a binomial on top of a binomial: each shipment is now one trial, and "success" is the event from part (a), so reuse that answer as the new pp.

Solution

32

The geometric distribution

Part A · Question 32 · Locked solution

Question 32

At busy time, a telephone exchange is very near capacity, so callers have difficulty placing their calls. It may be of interest to know the number of attempts necessary in order to gain a connection. Suppose that we let p = 0.05 be the probability of connection during busy time. We are interested in knowing the probability that 5 attempts are necessary for a successful call. Use geometric distribution.

How to think about it

"Number of tries until the first success" is the Geometric distribution: the first x−1x - 1 tries fail and try number xx succeeds. P(X=x)=(1−p)x−1pP(X = x) = (1 - p)^{x-1} p.

Solution

33

Poisson approximation

Part A · Question 33 · Locked solution

Question 33

In a certain industrial facility accidents occur infrequently. It is known that the probability of an accident on any given day is 0.005 and accidents are independent of each other.(use Poisson distribution)

a)what is the probability that in any given period of 400 days there will be an accident on one day?

b)what is the probability that there are at most three days with an accident?

How to think about it

Many trials (nn large) and a rare event (pp small): approximate the binomial with Poisson, using λ=np\lambda = np. Then P(X=x)=e−λλxx!P(X = x) = \dfrac{e^{-\lambda}\lambda^x}{x!}. "At most 3" means add x=0,1,2,3x = 0, 1, 2, 3.

Solution

34

The normal distribution

Part A · Question 34 · Locked solution

Question 34

(i) Suppose that X ∼ N(1,2). Find P(1 < X < 2)

(ii) Suppose the battery life of a laptop is normally distributed with a standard deviation of 20minutes. Engineering design requires that only one percent of batteries fail to last 300 minutes. What mean battery life is required to ensure this condition?

How to think about it

Every normal problem uses the same step: standardise with Z=X−μσZ = \dfrac{X - \mu}{\sigma} and use the Z table. Forward problem: you have xx values, convert to zz, read probabilities. Backward problem: you have a probability, read zz from the table, then solve for the unknown (μ\mu here). Be careful with notation: N(μ,σ2)N(\mu, \sigma^2) gives the variance second.

Solution

35

Means and variances of the common distributions

Part A · Question 35 · Locked solution

Question 35

It can be shown (check) that

NameNotationExpected valuevariance
BinomialX∼Bn,pX \sim B_{n,p}npnpnp(1−p)np(1-p)
GeometricX∼GeopX \sim \text{Geo}_p1p\frac1p1−pp2\frac{1-p}{p^2}
PoissonX∼PoλX \sim \text{Po}_\lambdaλ\lambdaλ\lambda
UniformX∼Ua,bX \sim U_{a,b}12(a+b)\frac12(a+b)(b−a)212\frac{(b-a)^2}{12}
ExponentialX∼ExpλX \sim \text{Exp}_\lambda1λ\frac1\lambda1λ2\frac1{\lambda^2}
ErlangX∼Erlangk,λX \sim \text{Erlang}_{k,\lambda}k⋅1λk \cdot \frac1\lambdak⋅1λ2k \cdot \frac1{\lambda^2}
Gaussian or NormalX∼Nμ,σ2X \sim N_{\mu,\sigma^2}μ\muσ2\sigma^2
How to think about it

Same recipe each time: find E(X)E(X), find E(X2)E(X^2) (or E[X(X−1)]E[X(X-1)] when factorials are involved, because it cancels nicely), then Var(X)=E(X2)−[E(X)]2\text{Var}(X) = E(X^2) - [E(X)]^2. For distributions that are sums of simple independent pieces (Binomial, Erlang), just add the means and variances of the pieces. Write q=1−pq = 1 - p.

Solution

B26

Binomial: the shock test

Part B · Question B26 · Locked solution

Question B26

The probability that a certain component will survive a given shock test is 3/4. Find the probability that exactly 2 of the next 4 components tested survive.

How to think about it

Fixed number of independent trials, same success probability, "exactly xx successes": Binomial.

Solution

B27

Binomial ranges and Chebyshev

Part B · Question B27 · Locked solution

Question B27

The probability that a patient recovers from a rare blood disease is 0.4. if 15 people are known to have contracted this disease, what is the probability that a) at least 10 b) from 3 to 8 C) exactly 5 survive? Find the mean and variance of this random variable and then use Chebychev's theorem to interpret the interval µ ± 2σ

How to think about it

Binomial with n=15n = 15, p=0.4p = 0.4. For ranges, use the cumulative binomial table: P(a≤X≤b)=P(X≤b)−P(X≤a−1)P(a \le X \le b) = P(X \le b) - P(X \le a - 1). Note the "a−1a - 1". Chebyshev's theorem says: for any distribution, at least 1−1k21 - \frac{1}{k^2} of the probability lies within kk standard deviations of the mean.

Solution

B28

Repeat of Question 31

Part B · Question B28 · Locked solution

Question B28

A large chain retailer purchases a certain kind of electronic device from a manufacturer. The manufacturer indicates that the defective rate of the device is 3%.

a) the inspector of the retailer randomly picks 20 items from a shipment. What is the probability that there will be at least one defective item among these 20

b) Suppose that the retailer receives 10 shipments in a month and the inspector randomly tests 20 devices per shipment. What is the probability that there will be 3 shipments containing at least one defective device?

How to think about it

Identical question. See Part A Question 31 for the reasoning.

Solution

B29

Geometric: the first defective

Part B · Question B29 · Locked solution

Question B29

In a certain manufacturing process it is known that, on the average, 1 in every 100 items is defective. What is the probability that the fifth item inspected is the first defective item found?

How to think about it

"First success on trial number xx": Geometric, as in Part A Question 32.

Solution

B30

Poisson: the particle counter

Part B · Question B30 · Locked solution

Question B30

During a laboratory experiment the average number of radioactive particles passing through a counter in 1millisecond is 4. What is the probability that 6 particles enter the counter in a given millisecond?

How to think about it

Counting random events in a fixed interval of time or space, when you are given the average rate: Poisson with λ\lambda = that average.

Solution

B31

Poisson: tankers turned away

Part B · Question B31 · Locked solution

Question B31

Ten is the average number of oil tankers arriving each day at a certain port city. The facilities at the port can handle at most 15 tankers per day. What is the probability that on a iven day tankers have to be turned away?

How to think about it

Poisson again (λ=10\lambda = 10). Translate the words: tankers are turned away when more than 15 arrive, so we need P(X>15)=1−P(X≤15)P(X > 15) = 1 - P(X \le 15). Use the cumulative Poisson table.

Solution

B32

Repeat of Question 33

Part B · Question B32 · Locked solution

Question B32

In a certain industrial facility accidents occur infrequently. It is known that the probability of an accident on any day is 0.005 and accidents are independent of each other.

a) What is the probability that in any given period of 400 days there will be an accident on one day?

b) What is the probability that there are at most three days with an accident?

How to think about it

Identical question. See Part A Question 33.

Solution

B33

aX + b for a density

Part B · Question B33 · Locked solution

Question B33

Let X be random variable having the density function given

f(x)={x23,−1<x<20,elswheref(x) = \begin{cases} \dfrac{x^2}{3}, & -1 < x < 2 \\ 0, & \text{elswhere} \end{cases}

Find the expected value and variance of g(X) = 4x + 3

How to think about it

Same idea as Part A Question 29, but with integrals. Find E(X)E(X) and Var(X)\text{Var}(X), then apply E(aX+b)=aE(X)+bE(aX + b) = aE(X) + b and Var(aX+b)=a2 Var(X)\text{Var}(aX + b) = a^2\,\text{Var}(X).

Solution

B34

(blank on the sheet)

Part B · Question B34

Question B34

This number is blank on the original sheet.

B35

Joint probability function

Part B · Question B35 · Locked solution

Question B35

Two refills of a ballpoint pen are selected at random from a box that contains 3 blue refills, 2 red refills and 3 green refills. If X is the number of the blue refills and Y is the number of red refills selected, find (a) the joint probability function f(x,y) and

(b) P[(X,Y) ∈ A], where A is the region {(x, y) | x + y ≤ 1}

(c) find their marginal distribution functions

(d) find the conditional distribution of X, given that Y = 1, and use it to determine P(X = 0|Y = 1).

(e) show that these random variables are not statistically independent.

How to think about it

Build the joint table cell by cell with combinations: choose xx blue, yy red, and the rest green, over all ways to choose 2 from 8. Then everything else comes from the table. Marginals: add along rows or columns. Conditional: take one column and divide by its total. Independence: needs f(x,y)=g(x)h(y)f(x,y) = g(x)h(y) in every cell, so one cell that fails is enough to disprove it.

Solution

B36

Joint density over a square

Part B · Question B36 · Locked solution

Question B36

A candy company distributes boxes of chocolates with a mixture of creams, toffees and nuts coated in both light and dark chocolate. For a randomly selected box, let X and Y, respectively, be the proportions of the light and dark chocolates that are creams and suppose that the joint density function is

f(x,y)={25(2x+3y),0≤x≤1, 0≤y≤10,elsewheref(x, y) = \begin{cases} \tfrac25(2x + 3y), & 0 \le x \le 1,\ 0 \le y \le 1 \\ 0, & \text{elsewhere} \end{cases}

a) Verify condition 2 of joint density function

b) Find P[(X, Y) ∈ A], where A is the region {(x, y) | 0 < x < 1/2, 1/4 < y < 1/2}

c) Find g(x) and h(y) for this joint density

How to think about it

Condition 2 is that the total volume is 1: ∬f dx dy=1\iint f\,dx\,dy = 1. A probability over a region is the double integral over that region. A marginal is found by integrating out the other variable over its full range. Do the inner integral first, treating the other letter as a constant.

Solution

B37

Joint density over a triangle

Part B · Question B37 · Locked solution

Question B37

The Joint density for the random variable (X, Y), where X is the unit temperature change and Y is the proportion of spectrum shift that a certain atomic particle produces is

f(x,y)={10xy2,0<x<y<10,elsewheref(x, y) = \begin{cases} 10xy^2, & 0 < x < y < 1 \\ 0, & \text{elsewhere} \end{cases}

a) Find the marginal densities g(x), h(y) and the conditional density f(y|x)

b) Find the probability that the spectrum shifts more than half of the total observations, given the temperature is increased to 0.25 unit.

How to think about it

The region is a triangle, not a square, so the limits depend on the other variable. Sketch it: xx is below yy. For a fixed xx, yy runs from xx up to 1. For a fixed yy, xx runs from 0 up to yy. Getting these limits right is the whole problem. Conditional density: f(y∣x)=f(x,y)/g(x)f(y \mid x) = f(x,y)/g(x). To condition on X=0.25X = 0.25, plug x=0.25x = 0.25 into f(y∣x)f(y \mid x) and integrate over the yy range asked.

Solution

B38

Independent exponential lifetimes

Part B · Question B38 · Locked solution

Question B38

Suppose that the shelf life, in years of a certain perishable food packaged in cardboard containers is a random variable whose probability density function is given by

f(x)={e−x,x>00,elswhere.f(x) = \begin{cases} e^{-x}, & x > 0 \\ 0, & \text{elswhere.} \end{cases}

Let X1, X2 and X3 represent the shelf lives for three of these containers selected independently and find P(X1 < 2, 1 < X2 < 3, X3 > 2)

How to think about it

Independent variables: the joint probability is the product of the three separate probabilities. Find each one by integrating e−xe^{-x} over its own range, then multiply.

Solution

B39

Combined mean

Part B · Question B39 · Locked solution

Question B39

Given two samples X and Y with means 9 and 8 respectively and sample sizes 50 and 40 respectively. Find their combined mean.

How to think about it

Never just average the two means when the sizes differ. A mean is total divided by count, so rebuild the totals (mean times size), add them, and divide by the total count. This is a weighted mean.

Solution

✓

Quick guide: which tool for which problem?

Read the question, find the words, pick the tool.

If the question says…Use
“or”Addition rule (subtract the overlap)
“given that”, “if you know”Conditional probability
“at least one”1−P(none)1 - P(\text{none})
Two stages, second depends on firstTree diagram, total probability
“Given the result, what was the cause?”Bayes
Choose items, order matters / does notPermutation / Combination
nn fixed trials, count successesBinomial
Trials until first successGeometric
Rare events, or average rate givenPoisson (λ=np\lambda = np or the given rate)
Bell curve, mean and s.d.Standardise to ZZ, use table
Density with unknown constantSet total area to 1
Mean or variance of aX+baX + baE(X)+baE(X) + b and a2 Var(X)a^2\,\text{Var}(X)

Probability is counting, done carefully. Every question on this sheet comes back to a handful of rules.

CSC211 Tutorial Sheet Solutions

Every question on the CSC211 probability and statistics tutorial sheet, solved in full. Before each solution, a short box shows how to recognise the problem and which rule to use, so the method carries over to the CA and the exam.

Anonymous reading stats and solution feedback help improve this book. No names or personal details are collected.

Questions are reproduced word for word from the CSC211 tutorial sheet so you can match them to your copy. Where the sheet has a typing mistake or a missing formula, the solution says what was assumed.