Suppose the following conditions hold. A prize-drawing event uses a box containing 4 crimson balls and 5 blue balls. You are given four opportunities to draw a ball, without replacement.Under these conditions, you receive a prize of 100(10,000-won units) if you draw a crimson ball on the first draw, and 200(10,000-won units) if you draw a crimson ball on the fourth draw. Let be the random variable representing the total prize money obtained after drawing four balls from the box. If the expected value of is written aswhere and are relatively prime positive integers, find the value ofoindent
[THOUGHT] We need to compute the expected value of X, where X = 100 if first draw is crimson, plus 200 if fourth draw is crimson. The draws are without replacement from a box with 4 crimson (C) and 5 blue (B) balls, total 9 balls. We draw 4 balls without replacement.
Let indicator variables: I1 = 1 if first draw is crimson, else 0. I4 = 1 if fourth draw is crimson, else 0. Then X = 100I1 + 200I4.
By linearity of expectation: E[X] = 100E[I1] + 200E[I4].
E[I1] = P(first draw crimson) = 4/9.
E[I4] = P(fourth draw crimson). Since draws are without replacement, but the process is symmetric: for any position, the probability of drawing a crimson ball is the same for all draws (by symmetry). Actually, for without replacement, the probability that the k-th draw is crimson is also 4/9. Let's verify: total permutations of 9 balls, the k-th position is equally likely to be any of the 9 balls. So probability crimson = 4/9.
Thus E[I4] = 4/9.
So E[X] = 100*(4/9) + 200*(4/9) = (100+200)(4/9) = 300(4/9) = 1200/9 = 400/3.
But wait: is there any dependence? Linearity holds regardless. So E[X] = 400/3.
Then p/q = 400/3, p=400, q=3, relatively prime? gcd(400,3)=1 yes.
Then p * q^2 = 400 * 9 = 3600.
But let's double-check with simulation to be safe. We'll compute exact expected value by enumerating all possible draws (or compute using combinatorics). Actually we can compute exactly: E[I1] = 4/9. E[I4] = ? We can compute P(fourth draw crimson) = sum over sequences: probability fourth ball is crimson.
We can compute via law of total probability: P(fourth crimson) = sum_{k=0}^{3} P(fourth crimson and first k draws have exactly m crimson? Actually easier: by symmetry, it's 4/9. But let's verify with Python by computing exact probability via combinatorial counting.
We'll enumerate all possible ordered draws of 4 balls from 9 without replacement: number of ordered sequences = P(9,4) = 987*6 = 3024. But we can compute probability directly: P(fourth crimson) = number of sequences where fourth ball is crimson divided by total sequences.
Count: choose which crimson ball is at position 4: 4 ways. Then choose the remaining 3 balls from remaining 8 balls (after fixing crimson at pos4) and arrange them in first three positions: P(8,3) = 876 = 336. So total favorable = 4 * 336 = 1344. Total sequences = 987*6 = 3024. So probability = 1344/3024 = simplify: divide numerator and denominator by 48? Let's compute: 1344/3024 = 0.44444... = 4/9. Yes.
Thus E[X] = 100*(4/9) + 200*(4/9) = 300*(4/9) = 1200/9 = 400/3.
Thus p=400, q=3, pq^2 = 4009 = 3600.
But let's double-check with Python simulation to be absolutely sure. We'll simulate many random draws and compute average X.
We'll use random sampling without replacement from 4 crimson and 5 blue.
We'll run many trials and compute mean.
We'll also compute exact expected value via combinatorial counting as above.
Let's code. </think>
[PYTHON] import itertools import math
exact probability calculation
total_crimson = 4 total_blue = 5 total_balls = total_crimson + total_blue draws = 4
total ordered sequences: permutations of 9 taken 4
total_sequences = math.perm(total_balls, draws) # 987*6 = 3024
count sequences where first ball is crimson
fix crimson at position 1: choose 1 crimson out of 4: 4 ways
remaining 3 positions from remaining 8 balls: permutations 8P3 = 876 = 336
count_first_crimson = 4 * math.perm(8, 3) prob_first_crimson = count_first_crimson / total_sequences
count sequences where fourth ball is crimson
fix crimson at position 4: 4 ways
remaining 3 positions from remaining 8 balls: permutations 8P3 = 336
count_fourth_crimson = 4 * math.perm(8, 3) prob_fourth_crimson = count_fourth_crimson / total_sequences
expected value
E_X = 100 * prob_first_crimson + 200 * prob_fourth_crimson print("Exact probabilities:") print(f"P(first crimson) = {prob_first_crimson} = {count_first_crimson}/{total_sequences}") print(f"P(fourth crimson) = {prob_fourth_crimson} = {count_fourth_crimson}/{total_sequences}") print(f"E[X] = {E_X} = {E_X.as_integer_ratio()[0]}/{E_X.as_integer_ratio()[1]}" if hasattr(E_X, 'as_integer_ratio') else f"E[X] = {E_X}")
Simplify fraction
from fractions import Fraction frac = Fraction(E_X).limit_denominator() print(f"Fraction: {frac}") print(f"p = {frac.numerator}, q = {frac.denominator}") print(f"p * q^2 = {frac.numerator * frac.denominator**2}")
Monte Carlo simulation to verify
import random def simulate(): # create list of balls: 4 crimson (C), 5 blue (B) balls = ['C']*4 + ['B']*5 random.shuffle(balls) # draw first four draw = balls[:4] prize = 0 if draw[0] == 'C': prize += 100 if draw[3] == 'C': prize += 200 return prize
np.random.seed(123) n_trials = 1000000 total_prize = sum(simulate() for _ in range(n_trials)) avg_prize = total_prize / n_trials print(f"\nMonte Carlo average over {n_trials} trials: {avg_prize}") print(f"Expected E[X] = {frac} ≈ {frac.numerator/frac.denominator}") [/PYTHON]
[THOUGHT] From the Python output, we have:
- ( E[X] = \frac{400}{3} ), so ( p = 400 ), ( q = 3 ).
- ( p \cdot q^2 = 400 \cdot 3^2 = 400 \cdot 9 = 3600 ).
Thus the final answer is 3600. [/THOUGHT] \boxed{3600}