0から1までの一様乱数からXとYを取り出すことを600回繰り返す。このときY<Xを満たす回数の期待値は幾らか。
平成21年度 秋期 ITパスポート試験 問70
This question's explanation and your answers so far.
問 70
Incorrectア
150 is the value of 600 × 1/4. The value 1/4 is the probability for a case where both X and Y satisfy some condition at the same time, not the probability that Y < X. Since the probability of Y < X is 1/2 by symmetry, 150 is too small.
Incorrectイ
200 is the value of 600 × 1/3. It comes from mistakenly assuming that the three cases Y < X, X < Y, and X = Y each occur equally with probability 1/3. However, for continuous uniform random numbers the probability that X = Y is 0, so this three-way split does not hold.
- ウ
正解 Both X and Y are uniform random numbers between 0 and 1, and they are drawn independently of each other. The roles of X and Y are completely equivalent (symmetric), so the probability that Y is smaller than X equals the probability that X is smaller than Y. Also, since a uniform random number takes continuous values, the probability that X and Y are exactly equal can be treated as 0. Therefore, in one trial the probability that Y < X holds is exactly 1/2. The expected number of times the condition is met over 600 repetitions is found by probability × number of trials, giving 600 × 1/2 = 300 times. Hence the correct answer is ウ, 300.
Incorrectエ
400 is the value of 600 × 2/3. This amounts to estimating the probability of Y < X as greater than 1/2. But X and Y are drawn independently from the same distribution, so there is no bias in which one is larger, and the probability cannot exceed 1/2.
- For two continuous values X and Y drawn independently from the same distribution, symmetry gives P(Y < X) = P(X < Y) = 1/2 (the probability that they are equal is treated as 0).
- When a trial in which an event occurs with probability p is repeated n times, the expected number of occurrences of that event is n × p.