Probability Tutorial
Probability Tutorial
e.g., In a tossing of 2 coin, the no. of heads (0,1 or 2) be our random variable.
Outcome : HH HT TH TT
Value : 2 1 1 0
Discrete random variable: A random variable, say X which can take a finite number
of values in an interval of the domain is called discrete random variable.
Note: i) Evidently, a random variable (r,v) is discrete if and only if its range is almost
countable.
ii) Random Variables are generally denoted by capital letters and their value
called running variable by small letters.
For example, if we toss a coin the variable can take two value 0 and 1 assigned to tail
and head respectively.
0, if x is tail
X(x) = {
1, if x is head
i) 𝑝(𝑥𝑖 ) ≥ 0
ii) ∑∞
𝑝(𝑥𝑖 ) 𝑖=1 𝑝(𝑥𝑖 ) = 1
The 𝑝(𝑥𝑖 )is called p.m.f of the r.v ‘X’. The set {𝑥𝑖 , 𝑝(𝑥𝑖 )} is called the probability
distribution function of the r.v ‘X’.
Continuous r.v : A r.v ‘X’ which can take any value in its domain or in an interval or
the union of intervals on the real line is called continuous r.v.
e.g., The weight of middle-aged people in India lying between 40 kg and 150 kg in
continuous random variable.
Notationally
𝑋(𝑥) = {𝑥: 40 ≤ 𝑥 ≤ 150}
Probability density function: The function explaining the probability distribution
associated with a continuous r.v. is called p.d.f. (probability density function).
If x is a continuous variable and 𝑓𝑥 (𝑥) is a probability of the event that x lies in the
1 1
interval (𝑥 − 2 𝑑𝑥) and (𝑥 + 2 𝑑𝑥) .
1 1
i.e., (𝑥 − 2 𝑑𝑥) ≤ 𝑥 ≤ (𝑥 + 2 𝑑𝑥)
𝑓𝑥 (𝑥) or simply f(𝑥) is called probability density function.
The p.d.f. of a r.v. ‘X’ has the following two ovious properties:
i) 𝑓(𝑥) ≥ 0
𝛼
ii) ∫−𝛼 𝑓(𝑥)𝑑𝑥 = 1
Classical definition of probability: If in an experiment all the possible outcomes are
exhaustive, equally likely and mutually exclusive, then the probability of happening of the
event ‘E’ is given by
𝑛𝑜. 𝑜𝑓 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 𝑓𝑎𝑣𝑜𝑢𝑟𝑎𝑏𝑙𝑒 𝑡𝑜 𝐸
𝑝=
𝑛𝑜. 𝑜𝑓 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠
𝑚
=
𝑛
Where,
m - favourable to event E
n – no. of possible outcomes
Since, the no. of events favourable to non-happening of event E are n-m, the
probability of non-happening of Event ‘E’ is given by
𝑛−𝑚 𝑚
𝑞= =1− = 1−𝑝
𝑛 𝑛
So that, 𝑝 + 𝑞 = 1 oviously 𝜕 ≤ 𝑝 ≤= 1, 0 ≤ 𝑞 ≤ 1.
Since, p, q are non-negative and cannot exceed 1.
Also, 𝑝(𝐸) = 0 refers an impossible event and
𝑝(𝐸) = 1 refers to a sure event.
3 1
e.g., getting an odd number when a die is rolled 𝑝 = 6 = 2 , 𝑚 = 1,3,5,
𝑛 = 1,2,3,4,5,6
Remark (1) Above definition hold only when the outcomes are equally likely.
Statistical or Empirical definition of probability: If m is the no. of times the event E
happens in n trials of experiment, the probability p of happening of event E is given by
𝑚
𝑝(𝐸) = lim , provided the limit exist.
𝑛→∞ 𝑛
Standard discrete probability distribution:
Where the two independent constants n and p are parameters of the binomial
distribution and 𝑝 + 𝑞 = 1.
Mean = 𝐸(𝑋) = 𝑛𝑝
Variance = 𝑛𝑝𝑞
ii) Poisson distribution: if the probability of success is very small and trial very large
then the distribution is poisson and for binomial distribution probability success and
failure are equal in trial.
𝑒 −ℷ ℷ𝑥
𝑝(X) = , ℷ ⟩0, 𝑥 = 0, … , ∞
𝑥!
𝐸(𝑥) = 𝑚𝑒𝑎𝑛 = ℷ
𝜇2 = 𝑣𝑎𝑟𝑖𝑎𝑛𝑐𝑒 = ℷ
Example: If on the average rain falls on ten days in every thirty, then find the
probability that the rain falls on at the most two days of a given week.
𝑞 = 1−𝑝 =1− 1⁄ = 2⁄
3 3
If x denotes the no. of days of rainfall in a given week then probability that rainfalls
on at the most two days of a given week is;
1 𝑜 2 7 1 1 2 6
= 7∁0 ( ) ( ) + 7∁1 ( ) ( )
3 3 3 3
1 2 2 5
+ 7∁2 ( ) ( )
3 3
1248
= = 0.5706
2187
Example: Customers enter a waiting line at an average rate of average rate of 6 per
minute. Assuming that the number entering the line in a given time interval has a poisson
distribution, determine the chance that at least one customer enters that line in the given
half minute.
Solution: Taking a minute as the unit of time, we have 𝜆 = 6 and, therefore, the
𝑚
average number of arrivals per half minute is 𝑛 = 3, if x denotes the number of customers
which enter the line in a given half minute, the probability that at least one customer enters
the line in the given half minute
= 1 − 0.0498 = 0.9502
Normal distribution: A r.v ‘X’ is said to have a normal distribution with parameter
𝜇 (called mean) and 𝜎 2 (called variance) if its p.d.f is given by the probability law
1 1 𝑥−𝜇 2
𝑓(𝑥; 𝜇, 𝜎) = 𝑒 −2 ( ) , −𝛼 < 𝑥 < 𝛼, < 𝜇 < 𝛼, 𝜎 > 0
𝜎√2𝜋 𝜎
Steps in testing of hypothesis:
Test of significance for small samples: In this section, the statistical test on
2
𝑡, ℵ 𝑎𝑛𝑑 𝐹 are given.
𝐻0 : 𝜇 = 𝜇0
𝐻1 : 𝜇 ≠ 𝜇0 (𝑡𝑤𝑜 𝑡𝑎𝑖𝑙𝑒𝑑)
𝑥̅ − 𝜇0
𝑡= ~𝑡𝑛−1
𝑆⁄
√𝑛
𝑛
1
𝑤ℎ𝑒𝑟𝑒, 𝑥̅ = ∑ 𝑋𝑖
𝑛
𝑖=1
𝑛
1
𝑠2 = ∑(𝑋𝑖 − 𝑥̅ )2
𝑛−1
𝑖=1
The computed value is compared with the tabulated value at 5 or 1 per cent levels of
significance and at (𝑛 − 1)𝑑. 𝑓. and accordingly the null hypothesis is accepted or rejected.
This method is known as t-test for single mean.
Let 𝑥̅1 and 𝑥̅2 be the sample mean of the sample of sizes 𝑛1 and 𝑛2 respectively
from a population with mean 𝜇1 and 𝜇2 and variance of the two population be same 𝜎2 ,
which is unknown
To test the null hypothesis that both the samples have been drawn from same
population, i.e., to test.
𝑥̅1 − 𝑥̅2
𝑡= 𝑤𝑖𝑡ℎ 𝑣 = 𝑛1 + 𝑛2 − 2 𝑑𝑒𝑔𝑟𝑒𝑒𝑠 𝑜𝑓 𝑓𝑟𝑒𝑒𝑑𝑜𝑚 (𝑑. 𝑓. )
1 1
𝑠√𝑛 + 𝑛
1 2
2
𝑛1 𝜎̂1 2 + 𝑛2 𝜎̂2 2
𝑡ℎ𝑒𝑛 𝑠 =
𝑛1 + 𝑛2 − 2
2
𝑆𝑖𝑛𝑐𝑒, 𝑥̅1 ~𝑁 (𝜇1 , 𝜎 ⁄𝑛1 )
2
𝑥̅2 ~𝑁 (𝜇2 , 𝜎 ⁄𝑛2 )
𝜎2 𝜎2
∴ 𝑥̅1 − 𝑥̅2 ~𝑁 (𝜇1 − 𝜇2 , + )
𝑛1 𝑛2
(c) Paired t-test for difference of means:
When 𝑛1 = 𝑛2 = 𝑛 and the two samples are not independent but the sample
observations are paired together, then this test is applied. Let (𝑥𝑖 , 𝑦𝑖 ), 𝑖 = 1, … , 𝑛 be a
random sample from a bivariate normal population with parameters (𝜇1 , 𝜇2 , 𝜎12 , 𝜎22 ).
𝐿𝑒𝑡 𝑑𝑖 = 𝑥𝑖 − 𝑦𝑖
𝐻0 : 𝜇1 − 𝜇2 = 𝜇𝑂
𝑛
1
𝑊ℎ𝑒𝑟𝑒, 𝑑̅ = ∑ 𝑑𝑖
𝑛
1
Test Statistics:
𝑑̅ − 𝜇𝑜
𝑡= ~𝑡𝑛−1
𝑠 ⁄ √𝑛
𝑛
1
𝑊ℎ𝑒𝑟𝑒, 𝑑̅ = ∑ 𝑑𝑖
𝑛
𝑛
1 2
𝑎𝑛𝑑 𝑠2 = ∑(𝑑𝑖 − 𝑑̅ )
𝑛−1
1
Example 1.
The mean weekly sales of soap bars in departmental stores was 146.3 bars per store.
After an advertising campaign the mean weekly sales in 22 stores for a typical week
increased to 153.7 and showed a standard deviation 17.2 was the advertising campaign
successful?
Test Statistics
𝑥̅ − 𝜇
𝑡= ~𝑡22−1 = 𝑡21
√𝑠 2 ⁄(𝑛 − 1)
Conclusion:
Table value t for 21 d.f. at 5% level of significance for single-tailed test in 1.72. Since
the calculated value is much greater than for 21 d.f. at 5% level of significance for single-
tailed test in 1.72. Since the calculated value is much greater than the tabulated value it is
highly significant. Hence we reject the null hypothesis and conclude that the advertising
campaign was definitely successful in promoting sales.