Let $X$ be a Geometric random variable with parameter $p = 1/2$. We define another random variable $Y$ in terms of $X$ as follows. $Y =$ min$\{X,4\}$ Let $X$ be a Geometric random variable with parameter $p = 1/2$. We define another random variable $Y$ in terms of $X$ as follows.  
$$Y = \min\{X,4\}.$$  
Here $\min\{X,4\}$ is the minimum between the value of $X$ and $4$. For example, if $X$ takes the value $3$ then $Y = \min\{X,4\}= 3$, whereas if $X = 5$, $Y = \min\{X,4\}= 4$.  
(c) Find the distribution of $Y$ (possible values and their probabilities).
(d) Compute $E[Y]$.
Can someone help my by explaining the question to me? I thought I knew what a geometric $RV$ was but the information given is confusing me because all I know is that $p=1/2$. I know the expectation of a geometric $RV$ is $1/p$ so in this case it is equal to $2$, but how do I find the distribution of $Y$ when you can plug in an infinite amount of numbers from $0$ to infinity into $X$?
 A: Hints


*

*$Y$ can only take the values: $1,2,3,4$. 

*For $k=1,2,3$ we have $Y=k\iff X=k$, hence $P(Y=k)=P(X=k)$.
A: More generally, let $m$ be some positive integer, and $X\sim\operatorname{Geo}(p)$ where $0<p<1$ (this doesn't make the analysis any more difficult, just plug in $m=4$ and $p=\frac12$). Then $$ Y = \min\{X,m\} = X\wedge m = X\mathsf 1_{\{X<m\}} + m\mathsf 1_{\{X\geqslant m\}}.$$
So, for $1\leqslant n<m$, we have
$$\mathbb P(Y=n) = \mathbb P(X=n) = (1-p)^{n-1}p,$$
so
\begin{align}
\mathbb P(Y<m) &= \sum_{n=1}^{m-1}\mathbb P(Y=n)\\ &= \sum_{n=1}^{m-1}(1-p)^{n-1}p\\ &= \frac{p(1-(1-p)^{m-1})}{1-(1-p)}\\ &= 1 - (1-p)^{m-1}. 
\end{align}
Therefore
$$\mathbb P(Y=m) = 1 -\mathbb P(Y<m) = (1-p)^{m-1}. $$
Hence the probability mass function of $Y$ is
$$\mathbb P(Y=n) = 
\begin{cases}
(1-p)^{n-1}p,& n = 1,2,\ldots, m-1\\
(1-p)^{m-1},& n=m.
\end{cases}
$$
From here we have
\begin{align}
\mathbb E[Y] &= \mathbb E[X\mathsf 1_{\{X<m\}}] + \mathbb E[m\mathsf 1_{\{X\geqslant m\}}]\\
&= \sum_{n=1}^{m-1}n\mathbb P(X=n) + m\mathbb P(X\geqslant m)\\
&= \frac{1 - p -(1+(m-1)p)(1-p)^m}{(1-p)p} + m(1-p)^{m-1}\\
&= \frac{1 - p -(1+(m-1)p)(1-p)^m + mp(1-p)^m}{(1-p)p}\\
&= \frac{1 - (1-p)^m}p.
\end{align}
A: You are playing the following game. You toss a fair coin, possibly several times. The game stops when either (i) you get a head or (ii) you have tossed a total of $4$ times. 
Then the random variable $Y$ is the number of tosses you made.
