Example 1
Question: A student participating in a coding challenge spends between 1 and 5 hours per day practicing. The probability distribution of the number of hours \( X \) spent is given by: \[P(X = x) = \begin{cases} kx, & \text{for } x = 1, 2 \\ k(x - 1)^2, & \text{for } x = 3, 4, 5 \\ 0, & \text{otherwise} \end{cases}\] where \( x \) denotes the number of hours. Find the mean number of hours spent by the student.
Solution: Step 1: Use \( \sum P(X = x) = 1 \) to find \( k \). The probabilities are: For \( x = 1 \): \( P(X=1) = k(1) = k \) For \( x = 2 \): \( P(X=2) = k(2) = 2k \) For \( x = 3 \): \( P(X=3) = k(3-1)^2 = 4k \) For \( x = 4 \): \( P(X=4) = k(4-1)^2 = 9k \) For \( x = 5 \): \( P(X=5) = k(5-1)^2 = 16k \) Summing all probabilities: \[k + 2k + 4k + 9k + 16k = 1\] \[32k = 1\] \[k = \frac{1}{32}\] Step 2: Write out each probability. \( P(X=1) = \dfrac{1}{32} \), \( P(X=2) = \dfrac{2}{32} \), \( P(X=3) = \dfrac{4}{32} \), \( P(X=4) = \dfrac{9}{32} \), \( P(X=5) = \dfrac{16}{32} \) Step 3: Compute \( E(X) = \sum x \cdot P(X=x) \). \[E(X) = 1 \cdot \frac{1}{32} + 2 \cdot \frac{2}{32} + 3 \cdot \frac{4}{32} + 4 \cdot \frac{9}{32} + 5 \cdot \frac{16}{32}\] \[E(X) = \frac{1 + 4 + 12 + 36 + 80}{32}\] \[E(X) = \frac{133}{32}\] \[E(X) = 4.15625\] Therefore, the mean number of hours spent is \( \dfrac{133}{32} \approx 4.16 \) hours.
Answer: \( E(X) = \dfrac{133}{32} \approx 4.16 \) hours
Example 2
Question: A fitness app tracks the number of hours \( X \) a user exercises per day. The number of hours ranges from 1 to 6, with the following probability distribution: \[P(X = x) = \begin{cases} k(2x + 1), & \text{for } x = 1, 2, 3 \\ kx^2, & \text{for } x = 4, 5, 6 \\ 0, & \text{otherwise} \end{cases}\] where \( x \) denotes the number of hours. Find the mean number of hours a user exercises per day.
Solution: Step 1: Use \( \sum P(X = x) = 1 \) to find \( k \). For \( x = 1 \): \( P(X=1) = k(2(1)+1) = 3k \) For \( x = 2 \): \( P(X=2) = k(2(2)+1) = 5k \) For \( x = 3 \): \( P(X=3) = k(2(3)+1) = 7k \) For \( x = 4 \): \( P(X=4) = k(4)^2 = 16k \) For \( x = 5 \): \( P(X=5) = k(5)^2 = 25k \) For \( x = 6 \): \( P(X=6) = k(6)^2 = 36k \) Summing all probabilities: \[3k + 5k + 7k + 16k + 25k + 36k = 1\] \[92k = 1\] \[k = \frac{1}{92}\] Step 2: Write out each probability. \( P(X=1) = \dfrac{3}{92} \), \( P(X=2) = \dfrac{5}{92} \), \( P(X=3) = \dfrac{7}{92} \), \( P(X=4) = \dfrac{16}{92} \), \( P(X=5) = \dfrac{25}{92} \), \( P(X=6) = \dfrac{36}{92} \) Step 3: Compute \( E(X) = \sum x \cdot P(X=x) \). \[E(X) = 1 \cdot \frac{3}{92} + 2 \cdot \frac{5}{92} + 3 \cdot \frac{7}{92} + 4 \cdot \frac{16}{92} + 5 \cdot \frac{25}{92} + 6 \cdot \frac{36}{92}\] \[E(X) = \frac{3 + 10 + 21 + 64 + 125 + 216}{92}\] \[E(X) = \frac{439}{92}\] \[E(X) \approx 4.77\] Therefore, the mean number of hours a user exercises per day is \( \dfrac{439}{92} \approx 4.77 \) hours.
Answer: \( E(X) = \dfrac{439}{92} \approx 4.77 \) hours