Module 4
Module 4
Contents
1 Sampling and Sampling Distributions 1
1.1 Types of Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Sampling Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Random Variables 2
2.1 Discrete Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 Continuous Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.3 Mixed Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Probability Distributions 3
3.1 Probability Mass Function (PMF) . . . . . . . . . . . . . . . . . . . . . . . . 3
3.2 Probability Density Function (PDF) . . . . . . . . . . . . . . . . . . . . . . 3
3.3 Cumulative Distribution Function (CDF) . . . . . . . . . . . . . . . . . . . . 3
1
1.1 Types of Sampling
Sampling methods are broadly categorized into probability and non-probability sampling.
For rigorous statistical inference, probability sampling is required.
• Simple Random Sampling (SRS): Every individual in the population has an equal
and independent chance of being selected.
• Stratified Sampling: The population is divided into mutually exclusive subgroups
(strata) based on a specific characteristic (e.g., age, income). A simple random sample
is then drawn from each stratum.
• Cluster Sampling: The population is divided into clusters (often geographical). A
random sample of clusters is chosen, and all members within the selected clusters are
surveyed.
• Systematic Sampling: An initial starting point is selected at random, and then
every k-th element in the population frame is selected.
2 Random Variables
Definition 2.1 (Random Variable). A random variable X is a measurable function that
assigns a real number to each outcome in the sample space Ω of a random experiment.
formally: X : Ω → R.
Random variables are classified based on the set of values they can take:
2
2.3 Mixed Random Variables
A mixed random variable has both discrete and continuous components. Its cumulative
distribution function will have jump discontinuities (discrete part) and continuous intervals.
• Example: The waiting time at a clinic. With probability p > 0, a patient waits exactly
0 minutes (discrete). Otherwise, they wait a continuous amount of time T > 0.
3 Probability Distributions
3.1 Probability Mass Function (PMF)
For a discrete random variable X, the PMF gives the probability that X takes a specific
value x.
pX (x) = P (X = x)
Properties:
Properties:
Definition 3.1 (CDF). The CDF FX (x) is defined as the probability that the random variable
X will take a value less than or equal to x.
FX (x) = P (X ≤ x)
Properties of CDF:
3
1. limx→−∞ FX (x) = 0 and limx→∞ FX (x) = 1.
2. Non-decreasing: If a < b, then FX (a) ≤ FX (b).
3. Right-continuous: limh→0+ FX (x + h) = FX (x).
d
Relationship: For a continuous random variable, fX (x) = F (x)
dx X
wherever the derivative
exists.
4.2 Moments
Moments are quantitative measures related to the shape of the function’s graph.
Definition 4.1 (n-th Raw Moment). The n-th moment about the origin is defined as the
expected value of X n :
µ′n = E[X n ]
Note that the first raw moment (n = 1) is the mean, E[X].
Definition 4.2 (n-th Central Moment). The n-th moment about the mean µ is defined as:
µn = E[(X − µ)n ]
Important Moments:
• Variance (2nd Central Moment): Measures the spread or dispersion of the distri-
bution.
Var(X) = σ 2 = E[(X − µ)2 ] = E[X 2 ] − (E[X])2
• Skewness (related to 3rd Central Moment): Measures the asymmetry of the
distribution.
• Kurtosis (related to 4th Central Moment): Measures the ”tailedness” of the
distribution.
4
Practice Questions
1. A retail outlet contains 20 similar laptops out of which 3 are defective. If a school makes
a random purchase of 2 of these computers, illustrate the probability distribution for
the number of defectives.
2. A box contains 15 light bulbs, out of which 4 are defective. If a store randomly selects
3 light bulbs from this box, illustrate the probability distribution for the number of
defective light bulbs selected.
5
Solutions
1. Laptop Defectives Problem
This problem follows a hypergeometric distribution because we are sampling without
replacement.
Total number of laptops, N = 20.
Number of defective laptops, K = 3.
Number of non-defective laptops = 20 − 3 = 17.
Sample size drawn, n = 2.
Let X be the random variable representing the number of defective laptops purchased.
The possible values for X are 0, 1, and 2.
The total number of ways to select 2 laptops out of 20 is:
20 20 × 19
= = 190
2 2×1
X 0 1 2
136 51 3
P (X) 190 190 190
136 51 3 190
(Note: 190
+ 190
+ 190
= 190
= 1, which confirms the distribution is correct.)
6
2. Light Bulb Defectives Problem
Total number of bulbs, N = 15.
Number of defective bulbs, K = 4.
Number of non-defective bulbs = 15 − 4 = 11.
Sample size drawn, n = 3.
Let X be the random variable representing the number of defective light bulbs selected.
The possible values for X are 0, 1, 2, and 3.
The total number of ways to select 3 bulbs out of 15 is:
15 15 × 14 × 13
= = 455
3 3×2×1
X 0 1 2 3
165 220 66 4
P (X) 455 455 455 455
7
Practice Questions
1. Suppose that the error in the reaction temperature, in ◦ C, for a controlled laboratory
experiment is a continuous random variable X having the probability density function
( 2
x
, for − 1 < x < 2
f (x) = 3
0, elsewhere
2. Suppose that the error in the reaction temperature, in ◦ C, for a controlled laboratory
experiment is a continuous random variable Y having the probability density function
(
1
, for 0 < y < 100
f (y) = 100
0, elsewhere
8
Solutions
1. Solution for Random Variable X:
9
R∞
ii. The total area under the curve must equal 1, i.e., −∞ f (y) dy = 1.
Z ∞ Z 100
1
f (y) dy = dy
−∞ 0 100
1 1
= [y]100
0 = (100 − 0) = 1
100 100
Since both conditions are satisfied, f (y) is a valid probability density function
(specifically, a Uniform distribution).
Practice Questions
27. Given the following probability distribution function f (x) of a discrete random variable
X.
x 0 1 2 3 4
1 3 2 1 1
f (x) 10 10 5 10 10
(i) Illustrate the cumulative distribution function F (x) of the random variable X.
(ii) Demonstrate that f (2) = 25 .
(iii) Calculate F (0), F (1), F (2), F (3), and F (4).
28. Given the following probability distribution function g(y) of a discrete random variable
Y.
y 1 2 3 4
g(y) 0.2 0.5 0.2 0.1
10
Solutions
27. Solution for Random Variable X:
11
0.5 + p = 1 =⇒ p = 0.5
(Note: The question paper asks to demonstrate 52 or 0.4, but this would result in a
total probability of 0.9. Therefore, 0.5 is the mathematically correct value to make
this a valid distribution.)
Practice Questions
2. A continuous random variable has the pdf
12
Solutions
2. Solution for Continuous Random Variable X:
05 (−1)5
k − =1
5 5
1
k 0− − =1
5
1
k = 1 =⇒ k = 5
5
So, the PDF is f (x) = 5x4 for −1 < x < 0.
The intersection of X > −1/2 and X < −1/4 is −1/2 < X < −1/4.
Step 1: Calculate the Numerator P (− 12 < X < − 41 )
Z −1/4 5 5
−1/4 1 1
5x dx = x5 −1/2 =
4
− − −
−1/2 4 2
1 1 1 32 31
=− − − =− + =
1024 32 1024 1024 1024
Step 2: Calculate the Denominator P (X < − 14 )
Since the lowest limit of the domain is −1, this is P (−1 < X < − 14 ):
Z −1/4 5
−1/4 1
5x dx = x5 −1 =
4
− − (−1)5
−1 4
13
1 1 1023
=− − (−1) = 1 − =
1024 1024 1024
Step 3: Calculate the Conditional Probability
P (− 12 < X < − 14 ) 31
1024 31 1
= = =
P (−1 < X < − 41 ) 1023
1024
1023 33
P (X = 0) + P (X = 1) + P (X = 2) = 1
(3C 2 ) + (4C − 10C 2 ) + (5C − 1) = 1
−7C 2 + 9C − 1 = 1
−7C 2 + 9C − 2 = 0
Multiplying by −1 gives a standard quadratic equation:
7C 2 − 9C + 2 = 0
7C 2 − 7C − 2C + 2 = 0
7C(C − 1) − 2(C − 1) = 0
(7C − 2)(C − 1) = 0
So, C = 1 or C = 27 .
Since probabilities cannot exceed 1, we must test both values:
• If C = 1, P (X = 0) = 3(1)2 = 3 (Invalid, probability > 1).
• If C = 27 , we get valid probabilities:
2
2 4 12
P (X = 0) = 3 =3 =
7 49 49
2
2 2 8 40 56 − 40 16
P (X = 1) = 4 − 10 = − = =
7 7 7 49 49 49
2 10 10 − 7 3 21
P (X = 2) = 5 −1= −1= = =
7 7 7 7 49
12+16+21 49
Sum = 49
= 49
= 1.
14
Thus, the valid value is C = 27 .
P (X = 1)
=
P (X = 1) + P (X = 2)
Substitute the probabilities we found in part (i):
16 16
49 49 16
= 16 21 = 37 =
49
+ 49 49
37
Practice Questions
15. If the probability mass function of a random variable X is given by P (X = r) = kr3 ,
r = 1, 2, 3, 4, then
(i) Illustrate the value of k, and
(ii) Solve, P 21 < X < 52 /X > 1 .
15
Solutions
15. Solution for Discrete RV X:
k(1 + 8 + 27 + 64) = 1
1
k(100) = 1 =⇒ k =
100
(ii) Solve P (0.5 < X < 2.5 | X > 1):
Using the conditional probability formula:
The intersection of (0.5 < X < 2.5) and (X > 1) restricts the integer values of X
to exactly X = 2.
The event X > 1 includes X = 2, 3, 4.
P (X = 2)
=
P (X = 2) + P (X = 3) + P (X = 4)
8 8
100 100 8
= 8 27 64 = 99 =
100
+ 100
+ 100 100
99
Setting 8k = 1 =⇒ k = 81 .
16
(i) Solve P (X < 1, Y < 3):
Z 1 Z 3
1
P (X < 1, Y < 3) = (6 − x − y) dy dx
0 2 8
Inner integral w.r.t y:
3
y2
1 1
6y − xy − = [(18 − 3x − 4.5) − (12 − 2x − 2)]
8 2 2 8
1 1
= [13.5 − 3x − 10 + 2x] = (3.5 − x)
8 8
Outer integral w.r.t x:
1 1
x2
Z
1 1 1 1 3
(3.5 − x) dx = 3.5x − = (3.5 − 0.5) = (3) =
0 8 8 2 0 8 8 8
P (X < 1, Y < 3)
P (X < 1 | Y < 3) =
P (Y < 3)
We already have the numerator (3/8). We need the marginal probability P (Y <
3): Z 2Z 3
1
P (Y < 3) = (6 − x − y) dy dx
0 2 8
Using the inner integral result from part (i), which was 18 (3.5 − x):
2 2
x2
Z
1 1 1 5
P (Y < 3) = (3.5 − x) dx = 3.5x − = (7 − 2) =
0 8 8 2 0 8 8
Therefore:
3
8 3
P (X < 1 | Y < 3) = 5 =
8
5
(i) P
Illustrate the value of K:
P (X) = 1 =⇒ 3K 2 + (4K − 10K 2 ) + (5K − 1) = 1
−7K 2 + 9K − 2 = 0 =⇒ 7K 2 − 9K + 2 = 0
17
(ii) Solve P (0 < X < 2 | X > 0):
P (0 < X < 2 | X > 0) = P ((0<X<2)∩(X>0))
P (X>0)
P (X=1)
= P (X=1)+P (X=2)
First, compute the probabilities with K = 2/7:
2 4 8 40 56 − 40 16
P (X = 1) = 4 − 10 = − = =
7 49 7 49 49 49
2 10 3 21
P (X = 2) = 5 −1= −1= =
7 7 7 49
Substitute into the formula:
16 16
49 49 16
= 16 21 = 37 =
49
+ 49 49
37
0 + k + 2k + 2k + 3k + k 2 + 2k 2 + (7k 2 + k) = 1
= 8(0.1) = 0.8
18