# Probability of an event vs probability of random variable

How does the probability of an event differ from the probability of a random variable? For example, consider the event where there are 4 babies born.

• Sample space:
BBBB, BBBG, BBGB, BGBB, GBBB, GBBG, GBGB, GGBB,
BGGB, BGBG, BBGG, BGGG, GBGG, GGBG, GGGB, GGGG

• P(no of girls born is 2): 6/16

Let X be the random variable

• X = no of girls born (takes values from 0 to 4).

• P(X = 2) = 6/16

So what is the use of defining a random variable and going through all the process of probability distribution? In essence it is same as 9th grade probability.

• What is your question? – Peter Flom Jun 26 at 11:08
• I am not able to understand the need of defining a random variable. I calculate the same probability with defining a sample space and calculating the favourable outcomes(as stated in the question example either X=2 or no of girls is 2). When it is all same then why random variable? why do we say that a random variable quantifies the outcome of a random event. What are we actually trying to achieve? – user1673216 Jun 26 at 14:13
• Re your "in essence" statement: That's precisely the point. Probability calculations are notoriously tricky. In complex situations (mathematical finance, weather prediction, etc) there's no avoiding the use of random variables; indeed, they are usually the objects of interest (think of an option price--a random variable--versus the myriad ways in which the underlying asset's price can evolve--an event). By studying toy problems amenable to analyses any ninth-grader can conduct, we establish that the random variable approach works, is a realistic model, and accords with intuition. – whuber Jun 26 at 14:30
• Thanks a ton!! So if I understand correctly when the random variable helps when the sample space cannot not defined comprehensively.. as in case of options where we don't know how the underlying will change... The random variable will help in notation simplification and studying the distribution of random variable can help in prediction without even the complete sample space... – user1673216 Jun 30 at 18:25

In the case of your interest, if $$X$$ is a random variable whose values are interpreted as the number of girls born, then the event that $$X = 2$$ is the event under consideration. By inspection we see that the set of all the points in the B-G space at which $$X = 2$$ is precisely the six points that have 2 G's; so we arrive at the same conclusion.
A random variable is a function taking its value in $$\mathbb{R}$$. So $$P(X)$$ doesn't make any sense. So the problem here is how to define your random variable $$X$$.
You can define it as : $$X$$ is the number of girls born. Then, $$\mathbb{P}[X=2]$$ is the probability that $$2$$ girls are born. So you can also compute $$\mathbb{P}[X=0], \mathbb{P}[X=1]$$ and so on.
Of course here, $$\mathbb{P}[X=2] = 6/16$$ and you can notice that it is exactly the same to say {no of girl born is 2} or $$\{X=2\}$$.
$$\{X=2\} = \{\text{no of girl born is } 2\}$$