Midterm Practice Questions
Easy Questions (3)
Question 1 (Based on Session 2, Ex. 1)
A standard 52-card deck is shuffled. What is the probability that you draw a card that is not a King?
Solution:
- Identify the Sample Space (Ω): The sample space is the entire set of possible outcomes. Here, it's the 52 cards in the deck. So, \(\#\Omega = 52\).
- Identify the Event (A): We are interested in the event \(A = \text{"The card is a King"}\). There are 4 Kings in a deck (Spades, Hearts, Clubs, Diamonds). So, \(\#A = 4\).
- Calculate P(A): The probability of drawing a King is \(P(A) = \frac{\#A}{\#\Omega} = \frac{4}{52} = \frac{1}{13}\).
- Find the Complement: The question asks for the probability of the card not being a King, which is the complement event, \(A^c\). We use the complement rule. \(P(A^c) = 1 - P(A) = 1 - \frac{1}{13} = \frac{12}{13}\).
Tutor's Note Connection: This problem uses the fundamental concepts from Session 1. As the notes say, for equally likely outcomes, the formula is \(P(A) = \frac{\#A}{\#\Omega}\). We then used the key formula for the probability of "NOT A": \(P(A^c) = 1 - P(A)\).
Question 2 (Based on Session 4)
You roll a single, fair six-sided die. Let the random variable \(X\) be the number that shows up. What is the expected value (or mean) of \(X\)?
Solution:
- Define the Random Variable (X): The tutor's notes for Session 4 define a random variable as a rule that assigns a number to an outcome. Here, \(X\) can take on the values \(\{1, 2, 3, 4, 5, 6\}\).
- Find the Probabilities: For a fair die, each outcome has an equal probability: \(P(X=x) = \frac{1}{6}\) for each value of x.
- Calculate the Expectation (E[X]): The formula for expectation is \(E[X] = \sum [x \cdot P(X=x)]\). \(E[X] = \left(1 \cdot \frac{1}{6}\right) + \left(2 \cdot \frac{1}{6}\right) + \left(3 \cdot \frac{1}{6}\right) + \left(4 \cdot \frac{1}{6}\right) + \left(5 \cdot \frac{1}{6}\right) + \left(6 \cdot \frac{1}{6}\right)\) \(E[X] = \frac{1}{6} \cdot (1 + 2 + 3 + 4 + 5 + 6)\) \(E[X] = \frac{1}{6} \cdot 21 = 3.5\)
Tutor's Note Connection: This is a direct application of the expectation formula from Session 4. As the tutor notes, the "expected value" is the long-run average. Even though you can't roll a 3.5, if you rolled the die many times, your average roll would be 3.5. It's the "center of mass" of the distribution.
Question 3 (Based on Session 3, Ex. 1)
An urn contains 5 red balls and 5 blue balls. You draw one ball, and then, without replacing it, you draw a second ball. Given that the first ball you drew was blue, what is the probability that the second ball is red?
Solution:
- Define the Events:
- \(B = \text{"The first ball is blue"}\)
- \(A = \text{"The second ball is red"}\)
- Identify the Goal: We want to find the conditional probability \(P(A|B)\), which means "the probability of A, given that B has already happened."
- Update the Sample Space: Since we know the first ball drawn was blue, we are now working with an updated situation. The urn no longer has 10 balls. It now has 9 balls total: 5 red and 4 blue.
- Calculate the Conditional Probability: The probability of now drawing a red ball from this new collection is simply: \(P(A|B) = \frac{\text{Number of red balls remaining}}{\text{Total number of balls remaining}} = \frac{5}{9}\).
Tutor's Note Connection: This is a classic Session 3 problem. The analogy of "your friend's car in the driveway" applies perfectly. The new information (the first ball was blue) changes the original probability of drawing a red ball (which was 5/10) to a new, updated probability (5/9). We are calculating \(P(A|B)\).
Medium Questions (4)
Question 4 (Based on Session 2, Ex. 2)
Five people (Ann, Bob, Charlie, David, Emily) are arranged randomly in a single line for a photo. What is the probability that Ann and Bob are standing next to each other?
Solution:
- Count the Total Arrangements (Ω): The total number of ways to arrange 5 distinct people is a permutation. \(\#\Omega = 5! = 5 \times 4 \times 3 \times 2 \times 1 = 120\).
- Count Favorable Arrangements (A): To count the ways Ann and Bob can be together, we treat them as a single "block" or unit: \((AB)\).
- Now we are arranging 4 items: \((AB), C, D, E\). The number of ways to arrange these 4 items is \(4! = 24\).
- Within the \((AB)\) block, Ann and Bob can be arranged in \(2!\) ways (\(AB\) or \(BA\)).
- Using the multiplication rule, the total number of favorable arrangements is \(4! \times 2! = 24 \times 2 = 48\).
- Calculate the Probability: \(P(A) = \frac{\#A}{\#\Omega} = \frac{48}{120} = \frac{2}{5} = 0.4\).
Tutor's Note Connection: This is a Session 2 counting problem. The tutor's note says to ask: "Does the order matter?" Since the arrangement in a line is key, order absolutely matters, so we use permutations (factorials). The trick is to group the items of interest (Ann and Bob) and treat them as a single unit, then multiply by the internal permutations of that unit.
Question 5 (Based on Session 5, Ex. 1)
The joint probability mass function (jpmf) of two random variables X and Y is given by the following table:
| Y \ X | 0 | 1 |
|---|---|---|
| 0 | 0.1 | 0.3 |
| 1 | 0.4 | 0.2 |
a) Find the marginal distributions of X and Y. b) Are X and Y independent?
Solution: a) Marginal Distributions: To find the marginal distribution of X, \(P(X=x)\), we sum down the columns. \(P(X=0) = P(X=0, Y=0) + P(X=0, Y=1) = 0.1 + 0.4 = 0.5\) \(P(X=1) = P(X=1, Y=0) + P(X=1, Y=1) = 0.3 + 0.2 = 0.5\) The distribution of X is: \(P(X=0)=0.5\), \(P(X=1)=0.5\).
To find the marginal distribution of Y, \(P(Y=y)\), we sum across the rows. \(P(Y=0) = P(X=0, Y=0) + P(X=1, Y=0) = 0.1 + 0.3 = 0.4\) \(P(Y=1) = P(X=0, Y=1) + P(X=1, Y=1) = 0.4 + 0.2 = 0.6\) The distribution of Y is: \(P(Y=0)=0.4\), \(P(Y=1)=0.6\).
b) Independence Check: For X and Y to be independent, the rule \(P(X=x, Y=y) = P(X=x) \times P(Y=y)\) must hold for all pairs of x and y. Let's just check one pair, \((X=0, Y=0)\).
- From the table (the joint probability): \(P(X=0, Y=0) = 0.1\)
- From our marginals: \(P(X=0) \times P(Y=0) = 0.5 \times 0.4 = 0.2\) Since \(0.1 \neq 0.2\), the condition for independence fails. Therefore, X and Y are not independent.
Tutor's Note Connection: This problem is straight from Session 5. The "joint distribution" is the table itself, telling us the probability of two things happening together. We derived the marginals (the individual distributions) by summing the rows and columns. The crucial step was using the independence formula from the notes to test the relationship between the variables.
Question 6 (Based on Session 6, Ex. 1)
A continuous random variable X has the probability density function (pdf): \(f(x) = cx^2\) for \(0 \leq x \leq 2\), and \(f(x) = 0\) otherwise.
a) Find the value of the constant \(c\). b) Find the probability \(P(X > 1)\).
Solution: a) Find the constant \(c\): For \(f(x)\) to be a valid pdf, the total area under the curve must equal 1. \(\int_{-\infty}^{\infty} f(x) \, dx = 1\) \(\int_{0}^{2} cx^2 \, dx = 1\) \(c \cdot \left[\frac{x^3}{3}\right]_0^2 = 1\) \(c \cdot \left(\frac{2^3}{3} - \frac{0^3}{3}\right) = 1\) \(c \cdot \frac{8}{3} = 1\) \(c = \frac{3}{8}\) So, the pdf is \(f(x) = \frac{3}{8}x^2\) for \(0 \leq x \leq 2\).
b) Find the probability P(X > 1): This is the area under the pdf curve from 1 to 2. \(P(X > 1) = \int_{1}^{2} \frac{3}{8}x^2 \, dx\) \(= \frac{3}{8} \cdot \left[\frac{x^3}{3}\right]_1^2\) \(= \frac{3}{8} \cdot \left(\frac{2^3}{3} - \frac{1^3}{3}\right)\) \(= \frac{3}{8} \cdot \left(\frac{8}{3} - \frac{1}{3}\right)\) \(= \frac{3}{8} \cdot \frac{7}{3} = \frac{21}{24} = \frac{7}{8}\)
Tutor's Note Connection: This is a core Session 6 problem. We used the two key formulas from the tutor's notes: \(\int_{-\infty}^{\infty} f(x) \, dx = 1\) to find the constant, and \(P(a \leq X \leq b) = \int_{a}^{b} f(x) \, dx\) to find the probability over an interval. This demonstrates the idea that for continuous variables, probability is the area under the curve.
Question 7 (Based on Session 5, Binomial Distribution)
An unfair coin has a 25% chance of landing Heads \(P(H)=0.25\). You toss the coin 5 times. Let the random variable S be the total number of Heads. What are the mean and variance of S?
Solution:
- Identify the Process: This is a sequence of independent trials, each with the same probability of success. As mentioned in the Session 5 slides, this describes a Bernoulli process, and the sum of these variables follows a Binomial Distribution.
- Define the Variables:
- Let \(X_i = 1\) if the i-th toss is Heads, and \(X_i = 0\) if it's Tails.
- \(S = X_1 + X_2 + X_3 + X_4 + X_5\).
- The parameters are \(n=5\) (number of trials) and \(p=0.25\) (probability of success).
- Calculate the Mean (E[S]): The mean of a binomial distribution is \(E[S] = np\). \(E[S] = 5 \times 0.25 = 1.25\).
- Calculate the Variance (Var[S]): The variance of a binomial distribution is \(\text{Var}(S) = np(1-p)\). \(\text{Var}(S) = 5 \times 0.25 \times (1 - 0.25)\) \(\text{Var}(S) = 5 \times 0.25 \times 0.75 = 0.9375\).
Tutor's Note Connection: This problem uses the properties of independence from Session 5. As the tutor's notes explain for the variance of a sum, if the variables (\(X_1\) through \(X_5\)) are independent, \(\text{Var}(X_1+...+X_5) = \text{Var}(X_1) + ... + \text{Var}(X_5)\). For a single Bernoulli trial, \(\text{Var}(X_i) = p(1-p)\). Summing this \(n\) times gives the formula \(np(1-p)\). This is a powerful shortcut that relies on the properties of independence and variance.
Hard Questions (3)
Question 8 (Based on Session 3, Ex. 5)
A factory has three machines (M1, M2, M3) producing the same part. M1 produces 50% of the parts, M2 produces 30%, and M3 produces 20%. The defect rates for the machines are 1% for M1, 3% for M2, and 4% for M3. If a part is selected at random and found to be defective, what is the probability that it was made by machine M1?
Solution:
- Define Events:
- \(B_1, B_2, B_3\): The event that the part was made by machine M1, M2, or M3, respectively.
- \(A\): The event that the selected part is defective.
- List Known Probabilities:
- Prior probabilities: \(P(B_1) = 0.50\), \(P(B_2) = 0.30\), \(P(B_3) = 0.20\).
- Conditional probabilities (defect rates): \(P(A|B_1) = 0.01\), \(P(A|B_2) = 0.03\), \(P(A|B_3) = 0.04\).
- State the Goal: We want to find \(P(B_1|A)\).
- Use the Law of Total Probability to find P(A): \(P(A) = P(A|B_1)P(B_1) + P(A|B_2)P(B_2) + P(A|B_3)P(B_3)\) \(P(A) = (0.01)(0.50) + (0.03)(0.30) + (0.04)(0.20)\) \(P(A) = 0.005 + 0.009 + 0.008 = 0.022\). The overall probability of any part being defective is 2.2%.
- Use Bayes' Theorem: \(P(B_1|A) = \frac{P(A|B_1) \times P(B_1)}{P(A)}\) \(P(B_1|A) = \frac{0.01 \times 0.50}{0.022}\) \(P(B_1|A) = \frac{0.005}{0.022} \approx 0.2273\) or 22.73%.
Tutor's Note Connection: This is a textbook Session 3 Bayes' Theorem problem, acting like the detective from the tutor's analogy. We started with the probability of a defect given the machine (\(P(A|B)\)) but wanted to find the probability of it being a certain machine given it was defective (\(P(B|A)\)). Bayes' Theorem is the tool that lets us "flip the conditional probability" to find the answer we need.
Question 9 (Based on Session 5 Concepts)
Using the same joint distribution from Medium Question #5, calculate the variance of the sum of the two variables, \(\text{Var}(X + Y)\).
| Y \ X | 0 | 1 |
|---|---|---|
| 0 | 0.1 | 0.3 |
| 1 | 0.4 | 0.2 |
Solution:
- Recall Previous Results:
- \(E[X] = 0.5\), \(E[Y] = 0.6\)
- X and Y are not independent.
- Use the Formula for Variance of a Sum: \(\text{Var}(X+Y) = \text{Var}(X) + \text{Var}(Y) + 2\text{Cov}(X,Y)\)
- Calculate Var(X) and Var(Y): We need \(E[X^2]\) and \(E[Y^2]\). \(E[X^2] = \sum [x^2 \cdot P(X=x)] = (0^2 \times 0.5) + (1^2 \times 0.5) = 0.5\) \(\text{Var}(X) = E[X^2] - (E[X])^2 = 0.5 - (0.5)^2 = 0.5 - 0.25 = 0.25\) \(E[Y^2] = \sum [y^2 \cdot P(Y=y)] = (0^2 \times 0.4) + (1^2 \times 0.6) = 0.6\) \(\text{Var}(Y) = E[Y^2] - (E[Y])^2 = 0.6 - (0.6)^2 = 0.6 - 0.36 = 0.24\)
- Calculate the Covariance: We need \(E[XY]\). \(E[XY] = \sum_x \sum_y [xy \cdot P(X=x, Y=y)]\) \(E[XY] = (0 \times 0 \times 0.1) + (1 \times 0 \times 0.3) + (0 \times 1 \times 0.4) + (1 \times 1 \times 0.2) = 0 + 0 + 0 + 0.2 = 0.2\) \(\text{Cov}(X,Y) = E[XY] - E[X]E[Y] = 0.2 - (0.5)(0.6) = 0.2 - 0.3 = -0.1\)
- Calculate the Final Answer: \(\text{Var}(X+Y) = 0.25 + 0.24 + 2(-0.1) = 0.49 - 0.2 = 0.29\)
Tutor's Note Connection: This problem demonstrates a crucial point from the Session 5 notes: because X and Y are not independent, their covariance is not zero. We had to use the full formula for the variance of a sum: \(\text{Var}(X+Y) = \text{Var}(X) + \text{Var}(Y) + 2\text{Cov}(X,Y)\). This is harder because it requires calculating all the individual components (variances and covariance) first. It also touches on the note that zero covariance doesn't imply independence, but here the non-zero covariance confirms they are not independent.
Question 10 (Based on Session 6, Ex. 2 & 3)
Let \(X\) be a random variable with a uniform distribution on the interval \((0, 4)\). Let a new random variable be defined as \(Y = \sqrt{X}\). Find the probability density function (pdf) of Y.
Solution:
- State the PDF of X: Since X is Uniform(0, 4), its pdf is \(f_X(x) = \frac{1}{4}\) for \(0 < x < 4\), and 0 otherwise.
- Find the CDF of Y: This is the most reliable method for transformations. The Cumulative Distribution Function (CDF) of Y is \(F_Y(y) = P(Y \leq y)\). \(F_Y(y) = P(\sqrt{X} \leq y)\) Since \(y\) must be positive (it's a square root), we can square both sides: \(F_Y(y) = P(X \leq y^2)\).
- Calculate P(X ≤ y²) using the distribution of X: \(P(X \leq y^2) = \int_{0}^{y^2} f_X(x) \, dx = \int_{0}^{y^2} \frac{1}{4} \, dx\) \(= \frac{1}{4} \cdot [x]_0^{y^2} = \frac{1}{4} \cdot (y^2 - 0) = \frac{y^2}{4}\).
- Determine the Range of Y: If \(0 < x < 4\), then \(0 < \sqrt{x} < 2\), so \(0 < y < 2\).
- Find the PDF of Y by Differentiating the CDF: The pdf is the derivative of the CDF. \(f_Y(y) = \frac{d}{dy} [F_Y(y)] = \frac{d}{dy} \left[\frac{y^2}{4}\right]\) \(f_Y(y) = \frac{2y}{4} = \frac{y}{2}\). So, the final pdf for Y is \(f_Y(y) = \frac{y}{2}\) for \(0 < y < 2\), and 0 otherwise.
Tutor's Note Connection: This is a hard problem because it combines concepts from Session 6 in a non-obvious way. It requires understanding the relationship between the PDF and the CDF (the PDF is the derivative of the CDF), a concept from the slides. The process of finding the distribution of a transformed variable (\(Y = g(X)\)) by first finding its CDF is a powerful and general technique that is essential for more advanced problems. It's the continuous-variable equivalent of finding the distribution of \(Z=X+Y\) for discrete variables.