1,259 views

1 Answer

Best answer
1 votes
1 votes

Let Xi denote the random variable for ith selection being prime. 

We require expected value of sum of all Xi to be 1. Linearity of expectation (refer link at bottom) says that expected value of sum of a random variable is equal to the sum of the individual expectations.

i.e., E(∑ Xi) = ∑ E(Xi)

We have X = 1/2302 and that is the same for all i. (once we take a number that number can be repeated also and hence events are independent)

So, E(∑ Xi) = ∑ E(Xi) = 1

=> ∑ (1/2302) = 1

as summation is from 1 to n, we get

n/2302 = 1 => n = 2302

http://www.cse.iitd.ac.in/~mohanty/col106/Resources/linearity_expectation.pdf

selected by

Related questions

1 votes
1 votes
0 answers
2
Sahil Gupta asked Nov 25, 2014
763 views
Answer the following part:a) Show that, under the assumption that the input is equally likely to be any of the n! permutations of theseintegers, the average number of com...