# Clarification: Bernoulli random variable with uniform distribution

Let $Z$ be a random variable which takes the value 1 when $U \le \frac 14$, $0$ otherwise, where $U$ ~ $\text{Uniform}(0,1)$.

So $Z$ is a Bernoulli random variable with PMF $$p_Z(z) = \begin{cases} p, & \text{if Z=1} \\[2ex] 1-p, & \text{if Z=0} \end{cases}$$ Is $p =\frac 14$?

• What is the probability that $U \leq 1/4$? – jbowman Apr 26 '18 at 15:55
• Is it $\frac 14$? – mathenthusiast Apr 26 '18 at 15:57
• Yes that is correct. You should write the pmf of $Z$ with the probabilities in the 'if' condition. – StubbornAtom Apr 26 '18 at 15:58
• So $p_Z(z)=\frac 14, \text{if } U \le \frac 14$ – mathenthusiast Apr 26 '18 at 16:06

YES. Since $$Z=1$$ if and only if $$U \le 1/4$$ (and otherwise zero), we get $$\DeclareMathOperator{\P}{\mathbb{P}} \P(Z=z)=\begin{cases} 1/4 &, \text{if z=1} \\ 3/4 &, \text{if z=0} \\ 0 &, \text{otherwise} \end{cases}$$