If $X\sim \text{Uniform}\{n,n+1,\ldots,2n\}$, how can I find $P\left(X<\frac{3n}{2}\right)$ (in terms of $n$ where relevant) for both odd and even values of $n$?
I got this in a test today and I think I got the right answer but can someone prove these results algebraically?
For odd values of n I got P=0.5 and for even values of n I got P=n/2n+2.
Also from what I understand, there are n+1 values, the uniform probability is 1/(n+1) and that 3n/2 is basically the half way point or the average value.
This is what I get:in total there is $$2n - (n-1)=n+1$$ values in the set $\{n, \ldots, 2n\}$, and there is $$(3n/2-1) - (n-1)=n/2$$ values in the set $\{n, \ldots, 3n/2 -1\}$ (if $n$ is even! see note below for odd). So for uniform probability we have $$P\left(X<\frac{3n}{2}\right) = \frac{n/2}{n+1}=\frac{n}{2(n+1)}$$
Aha (after some further thought), the above is correct for even numbers...for odd numbers $3n/2$ is not an integer so you have to add 1 to the numerator and then $P=0.5$. To be precise, set $n=2k+1$, then $$P\left(X<\frac{3n}{2}\right) = P\left(X<\frac{6k+3}{2}\right)=\frac{3k+1-2k}{4k+2-2k} = \frac{k+1}{2k+2}=0.5$$ Notice that $3k+1$ is the largest integer smaller than $\frac{6k+3}{2}=3k+3/2$.
So I think you are right.