# Expected Value and variance of a max randomized stocks

Hey guys I have been working on a probability and expected value/variance problem and the problem is:

Each day the price of a stock in the market is a random number between 0 and 1 independently of its value in previous days. A record breaking price occurs when the price on the current day exceeds all previous prices. What is the expected number of record breaking prices in n days? What is the variance of the number of record breaking prices in n days? (Hint: If I throw k points at random in [0,1] what is the chance that the ith point I throw is the largest among those k points? Given that the ith point is the largest among those k points, is its distribution different from uniform in [0, 1]?)

My approach was: first day Expected v = 1*1*(1 choose 1) = 1 second day expected v = first day Expected V + P(second price>first price) * 2(2 choose 1) but then from third day, it becomes way too complicated.

I know I should be using the integral to find Expected value of continuous variable, but then I would need to know the probability of each cases, which I have no idea of figuring it out.

Intuitively I know that the probability of getting the max value gets significantly lower as days go on, and I would assume it's on the line of a log function. But again, this is just a guess.

Can someone please lend a hand? thank you!

• What's the distribution on the random number between 0 and 1? Uniform?
– Newb
Commented Apr 18, 2015 at 21:24
• It's not necessarily uniform I don't think.
– PGod
Commented Apr 18, 2015 at 21:25
• It's got to be uniform. Otherwise the question is impossible, right? Commented Apr 18, 2015 at 21:33
• Yes they should be considered uniform. !
– user232537
Commented Apr 18, 2015 at 22:04

For $i=1,2,...,n$, let $X_i=1$ if there is a record set on day $i$, and $X_i=0$ if there isn't a record. For $X_i=1$, we must have that the value on day $i$ is the highest of the first $i$ days. So $P(X_i=1)=\frac1i$. So $E[X_i]=\frac1i$.
Since expectation is linear we have $E[\sum_{i=1}^n X_i]=\sum_{i=1}^n E[X_i]=1+\frac12+\cdots+\frac1n$, and this gives the expected number of records over $n$ days.
This confirms your idea that the number of records is roughly logarithmic in $n$.
• It seems that the key question for the variance is what is $E[X_i X_j]$ for $i \neq j$, since $E[X_i^2]$ is just $E[X_i]$ again.
• @Ian I think you're right, since the $X_i$s aren't independent. Commented Apr 19, 2015 at 2:18