Practice
Resources
Contests
Online IDE
New
Free Mock
Scaler
Practice
Improve your coding skills with our resources
Contests
Compete in popular contests with top coders
Scaler
Explore Offerings by SCALER

Go to Problems

# Random Variables

Definition:

A random variable is a variable whose possible values are numerical outcomes of a random phenomenon. There are two types of random variables, discrete and continuous.

Discrete Random Variables:

A discrete random variable can take only a finite number of distinct values. For example, attendance of a class on any given day,Â  the number of patients in a doctor's surgery, the number of defective light bulbs in a box of 10, etc.

The probability distribution of a discrete random variable is a list of probabilities associated with each of its possible values. It is also sometimes called the probability function or the probability mass function.

Suppose a random variable X may take k different values, with the probability that X = xi defined to be P(X = xi) = pi. The probabilities pi must satisfy the following:

Â

• 0 < pi < 1 for each i
• p1 + p2 + ... + pk = 1.

Â

Â

Continuos Random Variables:

A continuous random variable can take an infinite number of possible values. Continuous random variables are usually measurements, numerical interpretations of phenomenons. Examples include height, weight, the amount of sugar in an orange, the time required to run a mile.

Suppose a random variable X may take all values over an interval of real numbers. Then the probability that X is in the set of outcomes A, P(A), is defined to be the area above A and under a curve. The curve, which represents a function p(x), must satisfy the following:

1: The curve has no negative values (p(x) > 0 for all x)

2: The total area under the curve is equal to 1.

Â

## Serious about Learning Data Science and Machine Learning ?

Learn this and a lot more with Scaler's Data Science industry vetted curriculum.
Conditional probability
Problem Score Companies Time Status
Probability of Raining 30
9:42
How can he win? 30 7:28
White Marble Probability 30 3:16
5:00
Is it a queen? 30
4:23
Bayes theorem
Problem Score Companies Time Status
Positive Test Probability 30 10:05
Chances to be spam 30
8:27
Probability of shares of a company 30
8:50
Covid probability (bayes) 100
16:34
Normal and continuous distribution
Problem Score Companies Time Status
Distribution Percentage 30 5:02
Random variables
Problem Score Companies Time Status
Product probability 30
10:17
Random variable's probability 30
5:53
New variance 30
6:39
Toss random variable 30
1:52
Probability distributions
Problem Score Companies Time Status
Standard deviation 30
2:35
Probability Distribution 50
20:37
Free Mock Assessment
Fill up the details for personalised experience.
All fields are mandatory
Current Employer *
Enter company name *
Select an option *
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
Phone Number *
OTP will be sent to this number for verification
+1 *
+1
Change Number
Phone Number *
OTP will be sent to this number for verification
+1 *
+1
Change Number
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
*Enter the expected year of graduation if you're student
Current Employer *
Company Name *