# How to get the number of successes given $n$ trials , probability $P$ and a random variable $X$

I would like to have a formula that gives the number of successful trials of $n$ trials when the probability of each trial is $P$ and supplied with a random value $X=[0,1]$. Do I make somewhat sense?

Suppose a binomial experiment consists of $n$ trials and results in $x$ successes. If the probability of success on an individual trial is $P$, then the binomial probability is: $b(x; n, P) = \frac{ n!}{x! (n - x)!}P^x(1 - P)^{n - x}$.

But if I understand this right I need a formula for the function $x(b, n,P)$.

Update I'll try to clarify:

If you have a lottery you can make a draw to see if you win. If you participate in 200 lotteries you will have to make 200 draws to actually see how many times you'll win. But I want to simplfy the 200 draws to ONE draw. That draw would give me how many times I win the lottery (NOT the expected value, but the actual times I win according to that draw).

With a random value X I could decide each draw where x < P will be a win if x=[0,1]. I want to give my random X to one consolidated draw to decide how many wins I'll get. Still X=[0,1]. Let say if X get really close to 0 I will get many wins, and close to 1 I will get very few, this depends of P and n of course.

• This makes no sense unless $P=0$ or 1. Otherwise you can find only the probability that $x$ of $n$ trials will be successful. And you have already found the expression for it. An alternative would be to find the expected value of $x$. – user May 3 '18 at 22:00
• ok, not sure what b stand for , but in my head i want it to be a super dice that tells me how many sucesses I get. – Nick Sick May 3 '18 at 22:04
• As I already wrote an alternative would be to find the expected value of $x$, which is simply $nP$. – user May 3 '18 at 22:06
• I've tried to clarify. Please see my update. – Nick Sick May 4 '18 at 9:28