Module 7 - Continuous Probability Distributions
Instructional Hours: 4
Module Overview
In this module, you will learn about the t-distribution, exponential distribution
and the uniform distribution with their respective probability density functions
and their properties. Further, consider the area under the t-distribution curve,
the relationship between Normal distribution and t-distribution. The module
provides a video, examples and quiz for self-assessment in the learning process.
Learning Outcomes
1. Estimate the area under the curve of a t-distribution
2. Design simulation procedure for the uniform distribution
3. Evaluate probabilities from the exponential distribution
4. List the differences between t-distribution, uniform and exponential dis-
tributions
Learning Activities
1. Read the lecture notes (PDF)
2. Read the assigned reference materials
3. Watch lecture videos
4. Complete the module assessment/Quiz
Student t-distribution
The Student’s t-distribution, also known simply as the t-distribution, is a prob-
ability distribution that arises in the estimation of the mean of a normally
distributed population when the sample size is small, and the population stan-
dard deviation is unknown. It is particularly useful in hypothesis testing and
constructing confidence intervals when dealing with small sample sizes.
1
Properties of the t-Distribution
1. Symmetry: The t-distribution is symmetric about zero, similar to the
standard normal distribution.
2. Heavy tails: It has heavier tails than the normal distribution, which means
it is more prone to producing values that fall far from its mean. This
property decreases as the sample size increases.
3. Degrees of freedom: The shape of the t-distribution is determined by the
degrees of freedom (df), which is typically the sample size minus one (n-
1). As the degrees of freedom increase, the t-distribution approaches the
standard normal distribution.
4. Mean and variance:
• The mean of the t-distribution is zero.
• The variance is ν
ν−2 for ν > 2, and it is undefined for ν ≤ 2.
Probability density function (PDF)
The probability density function of the t-distribution with ν degrees of freedom
is given by:
− ν+1
Γ ν+1
2 t2 2
f (t|ν) = √ ν
1+
νπΓ 2 ν
where Γ is the gamma function, t is the variable, and ν is the degrees of freedom.
Limitations of the t-distribution
1. Small sample size: The t-distribution is specifically designed for small
sample sizes. For larger sample sizes, the normal distribution is more
appropriate.
2. Assumption of normality: It assumes that the underlying population from
which the sample is drawn is normally distributed. If this assumption is
violated, the t-distribution may not be appropriate.
3. Degrees of freedom sensitivity: The shape of the t-distribution heavily
depends on the degrees of freedom. Incorrect estimation of degrees of
freedom can lead to inaccurate results.
Simulating data from t-Distribution
Here is an R code snippet to simulate data from a t-distribution:
2
# Set seed for reproducibility
[Link](123)
# Number of samples
n <- 1000
# Degrees of freedom
df <- 10
# Simulate data from t-distribution
t_data <- rt(n, df)
# Display first few simulated values
head(t_data)
Practical Session
Create an interactive R studio in LMS for the student to practice the
above code.
Degrees of freedom
The degrees of freedom (df) are a measure of the amount of information available
in the data that can be used to estimate a parameter. In the context of the
t-distribution, the degrees of freedom are defined as the number of independent
values that can vary in the data set while estimating a parameter. For a sample
of size n, the degrees of freedom for the t-distribution is calculated as:
df = n − 1
where n is the sample size. The subtraction of 1 accounts for the fact that
one value is used to estimate the sample mean, thus reducing the number of
independent observations by one.
Importance of degrees of freedom
The degrees of freedom are crucial in determining the shape of the t-distribution.
As the degrees of freedom increase, the t-distribution approaches the standard
normal distribution. For smaller degrees of freedom, the t-distribution has
thicker tails, indicating a higher probability of observing values far from the
mean.
Sample t-distribution table
Below is a sample t-distribution table for various degrees of freedom and sig-
nificance levels. The table shows critical t-values for one-tailed and two-tailed
tests at common significance levels (α).
3
df α = 0.10 α = 0.05 α = 0.025 α = 0.01 α = 0.10 α = 0.05 α = 0.025 α = 0.01
(one-tail) (one-tail) (one-tail) (one-tail) (two-tail) (two-tail) (two-tail) (two-tail)
1 3.078 6.314 12.706 31.821 6.314 12.706 25.452 63.656
2 1.886 2.920 4.303 6.965 2.920 4.303 6.965 9.925
3 1.638 2.353 3.182 4.541 2.353 3.182 4.541 5.841
4 1.533 2.132 2.776 3.747 2.132 2.776 3.747 4.604
5 1.476 2.015 2.571 3.365 2.015 2.571 3.365 4.032
10 1.372 1.812 2.228 2.764 1.812 2.228 2.764 3.169
20 1.325 1.725 2.086 2.528 1.725 2.086 2.528 2.845
Example 1. A social media company wants to estimate the probability that a
user’s daily usage time exceeds 3 hours. From a sample of 16 users, the mean
usage time is found to be 2.5 hours with a standard deviation of 0.8 hours. What
is the probability that a randomly selected user’s usage time is greater than 3
hours?
Sample Mean(x̄) = 2.5 hours
Sample Standard Deviation(s) = 0.8 hours
Sample Size(n) = 16
Degrees of Freedom(df ) = 15
3 − 2.5 0.5
Test Statistic(t) = √ = = 2.5
0.8/ 16 0.2
Using a t-table or software, the cumulative probability for t = 2.5 with df =
15 is approximately 0.985. The probability that the usage time exceeds 3 hours
is:
P (T > 2.5) = 1 − 0.985 = 0.015
Example 2. A financial analyst is assessing the risk of a portfolio. From a
sample of 20 daily returns, the mean return is 0.02 with a standard deviation of
0.03. Estimate the probability that the return on a given day is less than 0.
Sample Mean(x̄) = 0.02
Sample Standard Deviation(s) = 0.03
Sample Size(n) = 20
Degrees of Freedom(df ) = 19
0 − 0.02 −0.02
Test Statistic(t) = √ = ≈ −2.99
0.03/ 20 0.0067
Using a t-table or software, the cumulative probability for t = −2.99 with df
= 19 is approximately 0.0035. The probability that the return is less than 0 is:
P (T < −2.99) = 0.0035
4
Example 3. In an engineering quality control test, the breaking strength of a
sample of 25 materials is measured, resulting in a mean strength of 5000 psi
with a standard deviation of 300 psi. Estimate the probability that the breaking
strength of a randomly selected material is between 4700 psi and 5300 psi.
Sample Mean(x̄) = 5000 psi
Sample Standard Deviation(s) = 300 psi
Sample Size(n) = 25
Degrees of Freedom(df ) = 24
For 4700 psi:
4700 − 5000 −300
Test Statistic(t4700 ) = √ = = −5
300/ 25 60
For 5300 psi:
5300 − 5000 300
Test Statistic(t5300 ) = √ = =5
300/ 25 60
Using a t-table or software, the cumulative probability for t = 5 with df =
24 is nearly 1, and for t = −5 it is nearly 0. The probability that the breaking
strength is between 4700 psi and 5300 psi is:
P (−5 < T < 5) ≈ 1 − 0 = 1
Thus, the breaking strength of a randomly selected material is almost certain
to be between 4700 psi and 5300 psi.
Normal distribution and Student t-distribution
Similarities
• Shape: Both distributions are symmetric and bell-shaped.
• Central Limit Theorem: Both can be used in the context of the Cen-
tral Limit Theorem, which states that the distribution of sample means
approaches a normal distribution as the sample size increases.
• Mean: Both distributions have a mean of zero (for standard normal and
standardized t-distribution).
• Applications: Both are used in statistical hypothesis testing and confi-
dence interval estimation.
5
Differences
• Degrees of freedom: The t-distribution is defined by its degrees of freedom
(df), which are typically related to the sample size. As df increases, the
t-distribution approaches the normal distribution.
• Tail behavior: The t-distribution has heavier tails compared to the normal
distribution, which means it provides a higher probability for extreme
values. This characteristic makes the t-distribution more appropriate for
small sample sizes.
• Use cases: The normal distribution is used when the population standard
deviation is known and the sample size is large. The t-distribution is used
when the sample size is small and/or the population standard deviation
is unknown.
Area under the t-Distribution
1. The t-distribution is a probability distribution that is symmetric and bell-
shaped, like the normal distribution, but has heavier tails. It is used when
the sample size is small and/or when the population standard deviation
is unknown.
2. The degrees of freedom for a t-distribution are calculated as the sample
size minus one (df = n − 1).
3. Determine whether you are looking for the area to the left of a given
t-value, to the right, or between two t-values.
4. To find the area under the t-distribution, you can use a t-table, which
provides the cumulative probability for various t-values and degrees of
freedom. Alternatively, statistical software or a calculator can be used for
more precise calculations.
5. Locate the row corresponding to your degrees of freedom. Find the col-
umn for the t-value that corresponds to your desired probability. The
intersection* gives you the cumulative probability (area).
6. Use functions like pt() in R to find cumulative probabilities. For example,
pt(t_value, df)
gives the area to the left of the given t-value.
7. For example: a t-value of 2.5 with 10 degrees of freedom:
pt(2.5, 10) # This gives the area to the left of t = 2.5
1 - pt(2.5, 10) # This gives the area to the right of t = 2.5
6
8. If you have a specified significance level (e.g., 0.05), you can find the
critical t-value that corresponds to this area using the qt() function in
R. For a two-tailed test with a significance level of 0.05 and 10 degrees of
freedom:
qt(0.975, 10) # This gives the critical t-value for a two-tailed test
Watch the video and attempt the quiz
Watch the video and answer the following questions
Video Visit the URL below to view a video:
[Link]
Video by jbstatistics - Finding areas under the t-distribution (Examples
using both R and the t table)
1. Suppose T has a t-distribution with 5 degrees of freedom
(a) What is P (T > 5.12)? (2 Marks) (Answer is 0.001854)
(b) What is P (T < 2.58)? (2 Marks) (Answer is 0.9753)
Uniform probability distribution
The uniform distribution is a continuous probability distribution characterized
by two parameters, the minimum value a and the maximum value b.
Properties of Uniform distribution
• Constant probability: Every interval of the same length within the distri-
bution’s range has an equal probability of being observed.
• Range: Defined within a finite interval [a, b]. Values outside this interval
have a probability of zero.
• Mean: The mean is given by
a+b
µ=
2
7
• Variance: The variance is
(b − a)2
σ2 =
12
• Symmetry: Symmetric about its mean.
• Lack of Skewness: Skewness is zero.
Probability Density Function
The probability density function (pdf) of the uniform distribution is defined as
(
1
for a ≤ x ≤ b
f (x) = b−a
0 otherwise
Limitations of Uniform Distribution
• Real-world applications: Not often encountered in real-world data.
• Extremes sensitivity: Sensitive to the minimum and maximum values.
• Lack of flexibility: Does not account for skewness or kurtosis.
Simulating data from Uniform distribution
In R, you can use the runif function to generate random numbers from a
uniform distribution. The syntax is:
runif(n, min = a, max = b)
where n is the number of random values to generate, min is the minimum value
a, and max is the maximum value b.
Here’s an example to generate 1000 random numbers from a uniform distri-
bution ranging from 0 to 1:
[Link](123) # For reproducibility
data <- runif(1000, min = 0, max = 1)
hist(data, main="Histogram of Uniform Distribution", xlab="Value", breaks=20)
Practical Session
Create an interactive R studio in LMS for the student to practice the
above code.
Exponential probability distribution
The exponential distribution is a continuous probability distribution often used
to model the time between events in a Poisson process. It is characterized by a
constant hazard rate.
8
Properties of Exponential distribution
• Memoryless property: The exponential distribution is the only continuous
distribution that has the memoryless property.
• Mean and variance:
1
– Mean: λ
1
– Variance: λ2
Probability density function (PDF)
(
λe−λx for x ≥ 0
f (x; λ) =
0 for x < 0
Cumulative distribution function (CDF)
(
1 − e−λx for x ≥ 0
F (x; λ) =
0 for x < 0
Limitations of Exponential distribution
• Constant hazard rate: Assumption may not always be realistic.
• Memoryless assumption: May not hold in many practical situations.
• Lack of shape flexibility: Fixed shape parameter limits ability to model
data with varying skewness.
Simulation
To simulate data from an exponential distribution with rate parameter λ:
1. Generate a random variable U from the uniform distribution on [0, 1].
2. Transform U using the inverse CDF of the exponential distribution:
1
X = − ln(1 − U )
λ
In R, you can simulate n exponential random variables using the rexp func-
tion:
# Simulate n exponential random variables with rate lambda
n <- 1000
lambda <- 2
simulated_data <- rexp(n, rate = lambda)
9
Practical Session
Create an interactive R studio in LMS for the student to practice the
above code.
Example 4. A random number generator produces numbers uniformly between
0 and 100. What is the probability that a randomly selected number is greater
than 75?
• The range of the uniform distribution is from 0 to 100.
• The total range (length) = 100 - 0 = 100.
• The range of interest (numbers greater than 75) is from 75 to 100, which
is 100 - 75 = 25.
• Probability:
Length of the interval from 75 to 100 25
P (X > 75) = = = 0.25.
Total length 100
Example 5. A manufacturer produces items that are uniformly defective be-
tween 0 and 50 units per batch. What is the probability that a randomly chosen
batch has fewer than 20 defective items?
• The total range is from 0 to 50.
• The range of interest (fewer than 20 defective items) is from 0 to 20, which
has a length of 20.
• Probability:
Length of the interval from 0 to 20 20
P (X < 20) = = = 0.4.
Total length 50
Example 6. A survey is conducted where participants can spend anywhere be-
tween 10 and 30 minutes answering questions. If the time spent is uniformly
distributed, what is the probability that a randomly selected participant spent
between 15 and 25 minutes?
• The total range is from 10 to 30 minutes.
• The range of interest (between 15 and 25 minutes) is from 15 to 25, which
has a length of 10.
• The total range length = 30 - 10 = 20.
• Probability:
Length of the interval from 15 to 25 10
P (15 < X < 25) = = = 0.5.
Total length 20
10
Example 7. A customer service center receives calls at an average rate of 5
calls per hour. What is the probability that the time until the next call is less
than 10 minutes?
• The rate (λ) = 5 calls/hour = 5
60 calls/minute = 1
12 calls/minute.
• The exponential distribution is given by:
P (X < x) = 1 − e−λx
• For x = 10 minutes:
P (X < 10) = 1 − e−( 12 )·10 = 1 − e− 6 ≈ 1 − 0.434 = 0.566
1 5
Thus, the probability that the time until the next call is less than 10 minutes is
approximately 0.566.
Example 8. A certain electronic device has an average lifetime of 2 years.
What is the probability that a randomly chosen device will last more than 3
years?
• The rate (λ) = 1
2 per year.
• We want P (X > 3):
P (X > x) = e−λx
• For x = 3:
P (X > 3) = e−( 2 )·3 = e− 2 ≈ 0.223
1 3
Thus, the probability that a randomly chosen device will last more than 3 years
is approximately 0.223.
Example 9. In a manufacturing plant, the time between the arrival of raw
materials follows an exponential distribution with an average of 4 days. What
is the probability that the time until the next arrival is between 2 and 6 days?
• The rate (λ) = 1
4 per day.
• We want P (2 < X < 6):
P (a < X < b) = P (X < b) − P (X < a)
• Calculate P (X < 6):
P (X < 6) = 1 − e−( 4 )·6 = 1 − e−1.5 ≈ 1 − 0.223 = 0.777
1
• Calculate P (X < 2):
P (X < 2) = 1 − e−( 4 )·2 = 1 − e−0.5 ≈ 1 − 0.606 = 0.394
1
• Now find P (2 < X < 6):
P (2 < X < 6) = P (X < 6) − P (X < 2) ≈ 0.777 − 0.394 = 0.383
Thus, the probability that the time until the next arrival is between 2 and 6
days is approximately 0.383.
11
Quiz
Attempt the quiz questions below:
1. What is the mean of a uniform distribution defined on the interval [2, 8]?
(answer is 5) (2 Marks)
2. True or false: The variance of a standard normal distribution is equal to
1. (Answer is True) (1 Mark)
3. Calculate the probability that a random variable X following an expo-
nential distribution with λ = 0.5 is greater than 3. (Answer is 0.2231) (3
Marks)
4. Match the distribution with its properties: (4 Marks)
Distribution Properties
A) Normal Distribution 1) Heavy tails (Answer is B)
B) Student’s t-Distribution 2) Symmetric and bell-shaped (Answer is A)
C) Uniform Distribution 3) All outcomes equally likely (Answer is C)
D) Exponential Distribution 4) Memoryless property (Answer is D)
5. Which of the following statements is true about the t-distribution? (2
Marks)
• A) The t-distribution is symmetric and has heavier tails than the
normal distribution. (Answer)
• B) The t-distribution is only defined for sample sizes greater than 30.
• C) The t-distribution converges to the exponential distribution as the
degrees of freedom increase.
• D) The t-distribution is used primarily for large sample sizes.
Reading Materials
1. Aliakbar Montazer Haghighi and Indika Wickramasinghe (2020). Prob-
ability, Statistics and Stochastic Processes for Engineers and Scientists.
First Edition, CRC Press(Pages 188-200) Read the selected pages
Summary
1. A uniform distribution is a type of probability distribution where all out-
comes are equally likely within a specified interval. It is characterized by
a constant probability density function.
12
Properties
• Mean: µ = a+b
2
(b−a)2
• Variance: σ 2 = 12
• The distribution is defined on the interval [a, b].
Probability density function (PDF):
(
1
for a ≤ x ≤ b
f (x) = b−a
0 otherwise
2. The exponential distribution is a continuous probability distribution used
to model the time between events in a Poisson process. It is characterized
by a constant average rate (λ).
Properties
• Mean: µ = 1
λ
• Variance: σ =2 1
λ2
• Memoryless property: P (X > s + t|X > s) = P (X > t).
Probability density function (PDF):
(
λe−λx for x ≥ 0
f (x) =
0 for x < 0
3. The Student’s t-distribution is a probability distribution that is symmet-
ric and bell-shaped, similar to the normal distribution but with heavier
tails. It is used primarily in hypothesis testing and in the construction of
confidence intervals when the sample size is small.
Properties
• Mean: µ = 0 (for df > 1)
• Variance: σ 2 = df
df −2 (for df > 2)
• The shape of the distribution depends on the degrees of freedom (df);
as df increases, it approaches the normal distribution.
13
Probability density function (PDF):
Γ df2+1
x2
− df2+1
f (x) = √ 1+
df πΓ df2 df
4. t-distribution simulation
[Link](123) # for reproducibility
n <- 10000 # number of simulations
df <- 10 # degrees of freedom
t_simulations <- rt(n, df)
mean(t_simulations) # Expected to be approximately 0
var(t_simulations) # Expected to be approximately df/(df-2) if df > 2
5. Exponential distribution simulation
[Link](123) # for reproducibility
n <- 10000 # number of simulations
rate <- 2 # rate parameter
exp_simulations <- rexp(n, rate)
mean(exp_simulations) # Expected to be approximately 1/rate
var(exp_simulations) # Expected to be approximately 1/(rate^2)
6. Uniform distribution simulation
[Link](123) # for reproducibility
n <- 10000 # number of simulations
min_val <- 0 # minimum value
max_val <- 1 # maximum value
unif_simulations <- runif(n, min_val, max_val)
mean(unif_simulations) # Expected to be approximately (min_val + max_val)/2
var(unif_simulations) # Expected to be approximately (max_val - min_val)^2 / 12
14