To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
The technical storage or access that is used exclusively for statistical purposes.
The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Random Variables – Continuous
A Random Variable is a set of possible values from a random experiment.
Example: Tossing a coin: we could get Heads or Tails.
Let’s give them the values Heads=0 and Tails=1 and we have a Random Variable “X”:
In short:
X = {0, 1}
Note: We could choose Heads=100 and Tails=150 or other values if we want! It is our choice.
Continuous
Random Variables can be either Discrete or Continuous:
In our Introduction to Random Variables (please read that first!) we look at many examples of Discrete Random Variables.
But here we look at the more advanced topic of Continuous Random Variables.
The Uniform Distribution
The Uniform Distribution (also called the Rectangular Distribution) is the simplest distribution.
It has equal probability for all values of the Random variable between a and b:
The probability of any value between a and b is p
We also know that p = 1/(b-a), because the total of all probabilities must be 1, so
We can write:
P(X = x) = 1/(b−a) for a ≤ x ≤ b
P(X = x) = 0 otherwise
Example: Old Faithful erupts every 91 minutes. You arrive there at random and wait for 20 minutes … what is the probability you will see it erupt?
This is actually easy to calculate, 20 minutes out of 91 minutes is:
p = 20/91 = 0.22 (to 2 decimals)
But let’s use the Uniform Distribution for practice.
To find the probability between a and a+20, find the blue area:
Area = (1/91) x (a+20 − a)
= (1/91) x 20
= 20/91
= 0.22 (to 2 decimals)
So there is a 0.22 probability you will see Old Faithful erupt.
If you waited the full 91 minutes you would be sure (p=1) to have seen it erupt.
But remember this is a random thing! It might erupt the moment you arrive, or any time in the 91 minutes.
Cumulative Uniform Distribution
We can have the Uniform Distribution as a cumulative (adding up as it goes along) distribution:
The probability starts at 0 and builds up to 1
This type of thing is called a “Cumulative distribution function”, often shortened to “CDF”
Example (continued):
Let’s use the “CDF” of the previous Uniform Distribution to work out the probability:
At a+20 the probability has accumulated to about 0.22
Summary
VIDEO TUTORIAL
Discrete Random Variables
Discrete random variables can take on either a finite or at most a countably infinite set of discrete values (for example, the integers).
Their probability distribution is given by a probability mass function which directly maps each value of the random variable to a probability.
For example, the value of x1x1 takes on the probability p1p1, the value of x2x2 takes on the probability p2p2, and so on.
The probabilities pipi must satisfy two requirements: every probability pipi is a number between 0 and 1, and the sum of all the probabilities is 1. (p1+p2+⋯+pk=1p1+p2+⋯+pk=1)
Discrete Probability Disrtibution: This shows the probability mass function of a discrete probability distribution. The probabilities of the singletons {1}, {3}, and {7} are respectively 0.2, 0.5, 0.3. A set not containing any of these points has probability zero.
Examples of discrete random variables include the values obtained from rolling a die and the grades received on a test out of 100.
Continuous Random Variables
A continuous random variable is a random variable where the data can take infinitely many values. For example, a random variable measuring the time taken for something to be done is continuous since there are an infinite number of possible times that can be taken.
For any continuous random variable with probability density function f(x), we have that:
This is a useful fact.
Example
X is a continuous random variable with probability density function given by f(x) = cx for 0 ≤ x ≤ 1, where c is a constant. Find c.
If we integrate f(x) between 0 and 1 we get c/2. Hence c/2 = 1 (from the useful fact above!), giving c = 2.
Cumulative Distribution Function (c.d.f.)
If X is a continuous random variable with p.d.f. f(x) defined on a ≤ x ≤ b, then the cumulative distribution function (c.d.f.), written F(t) is given by:
So the c.d.f. is found by integrating the p.d.f. between the minimum value of X and t.
Similarly, the probability density function of a continuous random variable can be obtained by differentiating the cumulative distribution.
The c.d.f. can be used to find out the probability of a random variable being between two values:
P(s ≤ X ≤ t) = the probability that X is between s and t. But this is equal to the probability that X ≤ t minus the probability that X ≤ s.
[We want the probability that X is in the red area:]
Hence:
Expectation and Variance
With discrete random variables, we had that the expectation was S x P(X = x) , where P(X = x) was the p.d.f.. It may come as no surprise that to find the expectation of a continuous random variable, we integrate rather than sum, i.e.:
As with discrete random variables, Var(X) = E(X2) – [E(X)]2
VIDEO TUTORIAL
Assignment
ASSIGNMENT : SUBMATH: Random and Continuous Variables Assignment MARKS : 30 DURATION : 1 week, 3 days