Probability
Probability
Probability
&
QUEUEING THEORY
Dr. P. GodhandaRaman
Assistant Professor
Department of Mathematics
Faculty of Engineering & Technology
SRM University, Kattankulathur – 603 203
Email : [email protected], Mobile : 9941740168
1
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
15MA207 – PROBABILITY AND QUEUEING THEORY
UNIT – 3: TESTING OF HYPOTHESIS
Syllabus
• Large Sample Test (Z - Test) – Mean, Proportion
• t – Test
• F - Test
• Chi – Square Test – Goodness of Fit, Independent Attributes
Samples
> 30 < 30
Large Sample Small Sample
Z – Test − F - Test −
referred by ̅ and .
Population mean and variance are normally referred by and while the sample mean and variance are
Sampling Distribution : If we draw a sample of size from a given finite population of size then the
= =
!
! !
total number of possible sample is . .
Standard Error (S.E.) : The standard deviation of sampling distribution of a statistic is known as its
standard error.
Test of Significance : A very important aspect of the sampling theory is the study of tests of significance
which enable us to decide on the basis of the sample results if
(i) The deviation between the observed sample statistic and the hypothetical parameter value is
significant.
Type I Error : Reject "# when it is true. Type II Error : Accept "# when it is wrong.
product. If this small amount of cooked product is good, we accept the lot to be good.
Critical Region : A region, corresponding to a statics (, in the sample space S which amounts to rejection
of the null hypothesis "# is called as critical region or region of rejection. The region of the sample space S
which amounts to the acceptance "# is called acceptance region.
Level of Significance : The probability ) that a random value of the statistic ( belongs to the critical region
is known as the level of significance. In other words, level of significance is the size of the Type I error.
The levels of significance usually employed in testing of hypothesis are 5% and 1%.
If the size of the sample > 30, then that sample is called large sample. If is large, the distributions,
LARGE SAMPLES
such as Binomial, Poisson, chi – square etc., are closely approximated by normal distributions. There are 4
important test to test the significance of large samples.
1. Test of significance for single proportion
2. Test of significance for difference of proportions
3. Test of significance for single mean
4. Test of significance for difference of means
/. = −2.33 /. = −1.645
Right Tailed Test
One Tailed Test
SINGLE PROPORTION
Suppose a large sample of size is taken from a normal population. To test the significant difference
between the sample proportion = and the population proportion >, we use the statistic 0 =
? @
@B
A
Note :
The probable limits for the observed proportion of successes = are given by > ± *. A .
DE
1.
3
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
If P is not known, the limits for the population proportion P are given by = ± *. A where H = 1 −
FG
2.
=.
3. If ) is not given, we can take safely 3 limits. Hence, confidence limits for observed proportion = are
> ± 3A and confidence limits for the population proportion P are = ± 3A where H = 1 − =.
DE FG
95% confidence limits for population proportion P are given by = ± 1.96A where H = 1 − =
FG
99% confidence limits for population proportion P are given by = ± 2.58A where H = 1 − =
FG
We accept the hypothesis at 5% level of significance. Hence the coin is unbiased and "# is accepted.
2. In a city, a sample of 1000 people were taken & out of them 540 are vegetarians & the rest are non
vegetarians. Can we say that both habits of eating are equally popular in the city at 1% & 5% level of
"# ∶ > = 0.5 Both habits are equally popular in the city).
"% : > ≠ 0.5 (two tailed test)
Test statistics * = = = 2.5298
F D #.]i #.]
`a
A A c.d c.d
b jccc
We reject the hypothesis at 1% level of significance. Hence the die is biased and "# is rejected. The excess
is not due to fluctuations but it is due to biased nature of die.
4
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
4. Experience has shown that 20 per cent of a manufactured product is of top quality. In one day
production of 400 articles, only 50 are of top quality. Show that either the production of the day chosen
was not a representative sample or the hypothesis of 20 per cent was wrong. Based on the particular
j y j y
0.093 ≤ > ≤ 0.157 , 95% confidence limits for the percentage of top quality product are 9.3 and 15.7.
Right Tailed Test
5. A salesman in a departmental store claims that at most 60% of the shoppers entering the store leaves
without making a purchase. A random sample of 50 shoppers showed that 35 of them left without
making a purchase. Are these sample results consistent with the claim of the salesman? Use a level of
> = populatin proportions of shoppers not making a purchase = 60% = %## = 0.6, _ = 1 − > = 0.4
^#
Null Hypothesis "# ∶ = = >, Alternative Hypothesis "% : = > > (right tailed test)
Test statistics * = = = 1.443, |*| = 1.443,
F D #.| #.^
`a
A A c.f c.}
b dc
#
> = proportion of persons survived after attack by a disease in the lot = 85% = 0.85,
_ = 1 − > = 0.15
Null Hypothesis "# ∶ > = 0.85, Alternative Hypothesis "% : > > 0.95 (right tailed test)
Test statistics * = = = 0.633 , |*| = 0.633,
F D #.l #.k]
`a
A A c.wd c.jd
b ec
|*| > *. , "# is rejected. *. = 2.33 at 1% level of significance, |*| < *. , "# is accepted
5
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
Left Tail Test
8. A manufacturer claimed that at least 95% of its products supplied confirms to the specifications. Out of
|*| = 4.96 > −2.33 , "# is rejected and "% is accepted at 1% level of significance.
The hospital is efficient in bringing down the fatality rate of typhoid patients.
Confidence Limits for the Population Proportion
10. A random sample of 500 toys was taken from a large consignment and 65 were found to be defective.
Find the percentage of defective toys in the consignment.
^]
Solution: = 500, = = ]## = 0.13, H = 1 − = = 0.87
Confidence Limits for the Population Proportion P are given by
FG #.%\×#.k|
> = = ± 3A = 0.13 ± 3A = 0.175 € • 0.085
]##
The percentage of defective toys in the consignment lies between 17.5 and 8.5.
11. A biased coin was thrown 400 times and 240 heads turned up. Find the probability of throwing heads in
a single trial almost certainly lies between 0.53 and 0.67.
i#
Solution: = 400, = = = 0.6, H = 1 − = = 0.4
i##
Confidence Limits for the Population Proportion P are given by
FG #.^×#.i
> = = ± 3A = 0.6 ± 3A = 0.6735 € • 0.5265
i##
The percentage of defective toys in the consignment lies between 52.65 and 67.35.
DIFFERENCE OF PROPORTIONS
Suppose 2 large samples of sizes % and are taken respectively from 2 different populations. To test the
?! ? ! ?! ƒ ?
significant difference between the sample proportions =% and = find 0 = where @ =
A@B‚
!
ƒ
!
„ !ƒ
!
and B = ! − @.
Two Tailed Test
1. Random samples of 400 men and 600 women were asked whether they would like to have a school near
their residence. 200 men and 325 women were in favour of the proposal. Test the hypothesis that the
proportions of men and women in favour of the proposal are same, at 5% level of significance.
Solution:
## \ ]
% = 400, = 600, =% = proportion of men = = 0.5, = = proportion of women = = 0.54
i## ^##
Null Hypothesis "# ∶ =% = = , Alternative Hypothesis "% : =% ≠ = (two tailed test)
6
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
Fj Fe j Fj ƒ e Fe
Test statistics * = , where > = = 0.525, _ = 1 − > = 0.475
j j
ADEob ƒb p jƒ e
j e
*. = 2.33 at 1% level of significance, |*| > *. , "# is rejected and "% is accepted.
That is, there is significant decrease in the consumption of tea after the increase in duty.
7
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
5. A machine produced 20 defective units in a sample of 400. After overhauling the machine, it produced
10 defective units in a batch of 300. Has the machine improved in production due to overhauling. Test at
5% level of significance.
# %#
Solution: % = 400, = 300, =% = = 0.05, = = = 0.033
i## \##
Null Hypothesis "# ∶ =% = = , Alternative Hypothesis "% : =% > = (right tailed test)
Fj Fe j Fj ƒ e Fe
Test statistics * = , where > = = 0.0427, _ = 1 − > = 0.9573
j j
ADEob ƒb p jƒ e
j e
#.#] #.#\\
*= j j
= 1.1
A #.#i |×#.l]|\ o ƒ p
}cc †cc
Null Hypothesis "# ∶ =% = = , Alternative Hypothesis "% : =% < = (left tailed test)
Fj Fe j Fj ƒ e Fe
Test statistics * = , where > = = 0.1712, _ = 1 − > = 0.8288
j j
ADEob ƒb p jƒ e
j e
#.%]] #.
*= j j
= −2.87
A #.%|% ×#.k kk o ƒ p
jfcc •cc
*. = −1.645 at 5% level of significance, |*| > |*. | , "# is rejected and "% is accepted.
SINGLE MEAN
mean . We set up null hypothesis that there is no difference between ̅ and , where ̅ is the sample mean.
Suppose we want to test whether the given sample of size has been drawn from a population with
ˆ ‰
‡
The statistic is 0 = Š where is the standard deviation of the population.
√
ˆ ‰
‡
If the population S.D. is not known, then use the statistic 0 = where is the standard deviation of the
√
population.
Š Š
ˆ − 01
1. The limits of population mean μ are given by ‡ ˆ + 01
≤ ‰ ≤ ‡ .
Note:
√ √
• •
2. At 5% level of significance, 95% confidence limits are ̅ − 1.96 ≤ ≤ ̅ + 1.96
√ √
.
• •
3. At 1% level of significance, 99% confidence limits are ̅ − 2.58 ≤ ≤ ̅ + 2.58
√ √
.
Two Tailed Test
1. The heights of college students in a city are normally distributed with S.D. 6 cms. A sample of 100
students has mean height 158 cms. Test the hypothesis that the mean height of college students in the
city is 160 cms.
Solution: = 100, = 160, ̅ = 158, = 6
Null Hypothesis "# ∶ = 160, Alternative Hypothesis "% : ≠ 160 (two tailed test)
Ž̅ • %]k %^#
Test statistics * = • = = 3.333
^/√%##
√b
*. = 2.58 at 1% level of significance, *. = 1.96 at 5% level of significance
|*| > *. , "# is rejected at both 1% and 5% level of significance.
Right Tailed Test
2. The mean breaking strength of the cables supplied by a manufacturer is 1800 with a S.D. of 100. By a
new technique in the manufacturing process, it is claimed that the braking strength of the cable has
increased. In order to test this claim, a sample of 50 cables is tested and it is found that the mean
breaking strength is 1850. Can we support the claim at 1% level of significance?
8
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
Solution: = 50, = 1800, ̅ = 1850, = 100
Null Hypothesis "# ∶ ̅ = , Alternative Hypothesis "% : ̅ > (right tailed test)
Ž̅ • %k]# %k##
Test statistics * = • = %##/√]#
= 3.54
√b
*. = 2.33 at 1% level of significance, |*| > *. , "# is rejected and "% is accepted.
That is, based on the sample data, we may support the claim of increase in breaking strength.
Left Tailed Test
3. An insurance agent has claimed that the average age of policy holders who issue through him is less
than the average for all agents which is 30.5 years. A random sample of 100 policy holders who had
issued through him gave the following age distribution.
Age 16-20 21-25 26-30 31-35 36-40
No. of Persons 12 22 20 30 16
Calculate the Arithmetic mean and standard deviation of this distribution and use these values to test his
Solution: ’ = 28, ℎ = 5
claim at 5% level of significance.
= ℎ A p = 5A
” ∑ –— ] %^ ∑ –—e ∑ –— %^i %^
̅ =’+ = 28 + = 28.8, −o −o p = 6.35, ≈ = 6.35
%## %## %##
‡− š
™= ›™ ›™
No. of
4
Age Mid point (x)
Persons (f)
16-20 12 18 -2 -24 48
21-25 22 23 -1 -22 22
26-30 20 28 0 0 0
31-35 30 33 1 30 30
36-40 16 38 2 32 64
Total œ=! ∑ ›™ = !6 ∑ ›™ = 164
Null Hypothesis "# ∶ = 30.5, Alternative Hypothesis "% : < 30.5 (left tailed test)
= −2.681, |*| = 2.681
Ž̅ • k.k \#.]
Test statistics * = • =
^.\]/√%##
√b
*. = −1.645 at 5% level of significance, |*| > *. , "# is rejected and "% is accepted.
Confidence Limits
4. The mean value of a random sample of 60 items was found to be 145 with a S.D. of 40. Find the 95%
confidence limits for the population mean. What size of the sample is required to estimate the population
|• Ž̅ |
95% confidence limits for the population mean are given by •/ ≤ 1.96
√
Since the population S.D. is not given, we can approximate it by the sample S.D. therefore 95%
|• Ž̅ |
≤ 1.96
-/√
confidence limits for the population mean are given by
- - i# i#
̅ − 1.96
≤ ≤ ̅ + 1.96
⟹ 145 − 1.96 ^#
≤ ≤ 145 + 1.96
√ √ √ √^#
134.9 ≤ ≤ 155.1
To test whether there is any significant difference between ¦¦¦% and ¦¦¦ we have to use the statistic
mean of a sample of size from a population with mean and variance .
¦‡¦¦¦ ¦¦
‡¦¦
0= !
Š Š
§ !ƒ
!
Note: If the samples have been drawn from the same population then % = =
¦¦¦
Žj¦ ¦¦¦¦
Že e e
j -j ƒ e -e
*= =
jƒ e
If is not known we can use a estimate of given by
• e• e
§ jƒ e
bj be
*. = 2.58 at 1% level of significance, |*| > *. , "# is rejected and "% is accepted.
That is, the samples could not have been drawn from the same population.
2. The mean of 2 large samples 1000 and 2000 members are 67.5 inches and 68.0 inches respectively. Can
*. = 1.96 at 1% level of significance, |*| > *. , "# is rejected and "% is accepted.
3. In a survey of buying habits, 400 women shoppers are chosen at random in super market A located in a
certain section of the city. Their average weekly food expenditure is Rs. 250 with a S.D. of Rs. 40. For
400 women shoppers chosen at random in super market B in another section of the city, the average
weekly food expenditure is Rs. 220 with a S.D. of Rs. 55. Test at 1% level of significance whether the
Ž̅ j Ž̅ e ]# #
we can take % = % € • = , Test statistics * = = e e
= 8.82
• e •e A}c ƒdd
§ j ƒ e }cc }cc
bj be
*. = 2.58 at 1% level of significance, |*| > *. , "# is rejected and "% is accepted.
Right Tailed Test
4. The average marks scored by 32 boys is 72 with a S.D. of 8, while that for 36 girls is 70 with a S.D. of 6.
Test at 1% level of significance whether the boys perform better than girls.
Solution: % = 32, = 36, ¦¦¦¦% = 72, ¦¦¦ = 70, % = 8, = 6
Null Hypothesis "# ∶ ̅% = ̅ ©ª % = , Alternative Hypothesis "% : ̅% > ̅ (right tailed test)
Ž̅ j Ž̅ e | |#
Test statistics * = = f} †f
= 1.15
• e •e A ƒ
§ j ƒ e †e †f
bj be
! + −
Confidence or Fiducial Limits for ‰:
Degree of freedom :
½ ½
95% Confidence limits for μ : ̅ − (#.#] o p ≤ ≤ ̅ + (#.#] o p
√ √
½ ½
99% Confidence limits for μ : ̅ − (#.#% o p ≤ ≤ ̅ + (#.#% o p
√ √
Application of t – distribution:
(i) To test if the sample mean ̅ differs significantly from the hypothetical value μ of the population mean.
The t – distribution has a wide number of applications in statistics, some of which are enumerated below
(ii) To test the significance of the difference between two sample means.
(iii) To test the significance of an observed sample correlation coefficient and sample regression coefficient
(iv) To test the significance of observed partial correlation coefficient.
Assumption for students’s t – test
(i) The parent population from which the sample is drawn is normal.
(ii) The sample observations are independent, that is, the sample is random.
(iii) The population standard deviation is unknown.
PROBLEMS
Students ‘t’ – Test : Single Mean and Standard Deviation Given Directly
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 S.D. of
Calculate value t > Tabulated t. ¾ is rejected. The sample could not have come from this population.
3. A spare part manufacturer is making spare parts with axle diameter of 0.700 inch. A random sample of
10 parts shows a mean diameter of 0.742 inch with a S.D. of 0.040 inch. Verify whether the work
Solution: = 12
accompanied by an increase in B.P.?
Null Hypothesis : ̅ = , where = 0, that is, the injection will not result in increase in B.P.
Alternate Hypothesis ! : ̅> (Right tailed)
∑b́µj Ž´ \% ∑ Že ∑Ž %k]
̅= = = 2.58, = −o p = − 2.58 = 8.76 ⟹ = 2.96
% %
Ž̅ • .]k #
(= • = e.•f = 2.89 , Degree of freedom: n − 1 = 12 − 1 = 11 at 5% level of significance = 1.80.
o p o p
√b³j √je³j
Calculate value t > Tabulated t. ¾ is rejected. The injection is accompanied by an increase in B.P.
Students ‘t’ – Test : Single Mean and Standard Deviation Not Given Directly
6. A random sample of 10 boys had the following I.Q.’s 70, 120, 110, 101, 88, 83, 95, 98, 107, 100. Do these
date support the assumption of a population mean I.Q.’s of 100? Find a reasonable range in which most
of the mean I.Q. values of samples of 10 boys lie.
Solution: = 10, = 100, : = 100, ! : ≠ 100 (Two tail)
∑b́µj Ž´ l| ∑b́µj Ž´ Ž̅ e %k\\.^
̅= = %#
= 97.2, ¶ = %
= %# %
= 203.73
= −0.62 ⇒ | | = . Ä
Ž̅ • l|. %## .k
(= ¿ = =Â
o p ec†.y† √ #.\|\Ã
√b ÀA Á
jc
‡ ‡−‡ ˆ ‡−ˆ ‡
70 -27.2 739.84
120 22.8 519.84
110 12.8 163.84
101 3.8 14.44
88 -9.2 84.64
83 -14.2 201.64
95 -2.2 4.84
98 0.8 0.64
107 9.8 96.04
∑ ‡ = 972 ∑ ‡−‡
ˆ =1833.60
100 2.8 7.84
12
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
d.f.= n − 1 = 10 − 1 = 9 at 5% LOS = 2.262. Calculate value t < Tabulated t. ¾ is accepted.
Conclusion: The data are consistent with the assumption for a mean I.Q. of 100 in population.
½ ½
95% Confidence Limits for ‰: ̅ − (#.#] o p ≤ ≤ ̅ + (#.#] o p
√ √
#\.|\ #\.|\
97.2 − 2.262 ÀA %#
Á≤ ≤ 97.2 + 2.262 ÀA %#
Á
86.99 ≤ ≤ 107.41, Hence the required 95% confidence interval is [86.99, 107.41].
7. The wages of 10 workers taken at random from a factory are given as Wages: 578, 572, 570, 568, 572,
578, 570, 572, 596, 584. Is it possible that the mean wage of all workers of this factory could be Rs. 580
Solution: = 10, = 580, : = 580, ! : ≠ 580 (Two tailed)
∑b́µj Ž´ ]|^# ∑b́µj Ž´ Ž̅ e ^]^
̅= = = 576, ¶ = = = 72.89
%# % %# %
= −1.48 ⇒ | | = !. Çš
Ž̅ • ]|^ ]k# i
(= ¿ = =Â
o p ye.w• √|. klÃ
√b ÀA Á
jc
: "# : ¦¦¦ ¦¦¦ , i.e. The two types I and II of electric bulbs are identical.
‡! = ‡
Solution:
» j -je ƒ e -ee ¼ »k \^ e ƒ| i# e ¼
= = = 1659.08
jƒ e kƒ|
Standard deviation given directly:
¦¦¦¦
Žj ¦Ž¦¦¦ % \i %#\^
(= j
e
j
= j j
= 9.39, degree of freedom = n% + n − 2 = 3 at 5% level of significance
A½e o ƒ p A%^]l.#k o ƒ p
bj be w y
for right tailed test = 1.77. Calculate value t > Tabulated t. ¾ is rejected.
Conclusion: The type I is definitely superior to type II regarding length of life.
9. The following table gives the values of protein form cow’s milk and buffalo’s milk. Examine if these
difference are significant.
Cow’s Milk 1.90 1.95 2.00 2.02 1.85 1.80
Buffalo’s Milk 2.12 2.00 2.20 2.45 2.20 2.10
13
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
Solution: % = 6, = 6, Null Hypothesis : "# : ‰! = ‰ , Alternate Hypothesis : "% : ‰! ≠ ‰
∑ Žj %%.] ∑ Že %\.#| ∑ Žje ∑ Žj .%^
¦¦¦% = = = 1.92, ¦¦¦ = = = 2.178, % = −o p = − 1.92 = 0.0062
j ^ e ^ j j ^
∑ Žee ∑ Že » - e ƒ -e ¼
k.]l ¦Ž¦¦j¦ ¦¦¦¦
Že
= −o p = − 2.178 = 0.0194 , ¶ = j j e e
,(=
e e ^ jƒ e A½ e o
j j
ƒ p
bj be
¦¦¦¦
Žj ¦¦¦
Že¦ %.l .%k
(= = = 3.64, since % = = , d.f.= = 10 at 5% LOS = 2.33. ¾ is rejected.
•e Ê•e c.ccfeÊc.cj•}
A j e A
b³j f³j
Students ‘t’ – Test : Difference Mean and Standard Deviation Not Given Directly
10. Below are given the gain in weights (in kgs) of pigs fed on two diets A and B.
Diet A 25 32 30 34 24 14 32 24 30 31 35 25 - - -
Diet B 44 34 22 10 47 31 40 30 32 35 18 21 35 29 22
Test if the two diets differ significantly as regards their effect on increase in weight.
‡ ‡−‡ ˆ · ·−· ˆ
Solution:
‡−‡ ˆ ·−· ˆ
25 -3 9 44 196 14
32 4 16 34 16 4
30 2 4 22 64 -8
34 6 36 10 400 -20
24 -4 16 47 289 17
14 -14 196 31 1 1
32 4 16 40 100 10
24 -4 16 30 0 0
30 2 4 32 4 2
31 3 9 35 25 5
35 7 49 18 144 -12
25 -3 9 21 81 -9
35 25 5
∑ ‡ = ÉÉÄ ∑ ‡−‡ ˆ = Éš0
29 1 -1
∑ · = Ç4
∑ ·−· ˆ =
22 64 -8
Null Hypothesis : "# : ¦¦¦ ¦¦¦ , i.e. There is no significant difference between the mean
‡! = ‡ !Ç! increase in
weight due to diets A and B, Alternate Hypothesis : "% : ¦¦¦ ¦¦¦ (Two tailed)
‡! ≠ ‡
∑b́µj Ž´ \\^ ∑b
ºµj ¹º i]#
% = 12, = 15, ˆ = = = 28, ¸
ˆ= = = 30
% %]
∑ Ž Ž̅ eƒ ∑ ¹ ¹¦ e
= = 71.6
jƒ e
Standard deviation not given directly:
= −0.609 ⇒ | | = . Ä Ë, d.f.=
Ž̅ ¹¦ k \#
(= j j
= j j % + − 2 = 25 at 5% LOS = 2.06.
A½e o ƒ p A|%.^ o ƒ p
bj be je jd
‡ ‡−‡ ˆ · ·−· ˆ
Solution:
‡−‡ ˆ ·−· ˆ
42 -4 16 38 -19 361
39 -7 49 42 -15 225
48 2 4 56 -1 1
60 14 196 64 7 49
41 -5 25 68 11 121
∑‡ = É ∑ ‡−‡
ˆ = Ë
69 12 144
∑ · = ÉËË ∑ ·−·
ˆ =Ë Ä
62 5 25
14
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
Null Hypothesis : "# : ‰! = ‰ , Alternate Hypothesis : "% : ‰! < ‰
∑b́µj Ž´ \# ∑b
ºµj ¹º \ll
% = 5, = 7, ˆ = = = 46, ¸
ˆ= = = 57
] |
∑ Ž Ž̅ e ƒ ∑ ¹ ¹¦ e l#ƒl ^ % %^
= = = = 121.6
jƒ e ]ƒ| %#
Standard deviation not given directly:
= −1.703 ⇒ | | = !. È É, d.f.=
Ž̅ ¹¦ i^ ]| i^ ]| %%
(= = = = % + − 2 = 10 at 5%
j j
A½e o ƒ p
j j √i%.^l ^.i^
bj be
A% %.^ o ƒ p
d y
15
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
Null Hypothesis : "# : [ = Ð , Alternate Hypothesis : "% : [ ≠ Ð
∑ Ž Ž̅ e k%.\i ∑ ¹ ¹¦ e %\\.| ½Óe . l
¶[ = = = 16.268, ¶Ð = = = 22.29 , Ñ = e = = 1.37,
j % ^ % e % | % ½Ò %^. ^k
d.f. = − 1,− 1 = 6, 5 at 5% LOS = 4.95. Calculate value F < Tabulated F. ¾ is accepted.
%
t – test and F – Test
1. The nicotine contents in milligrams in two samples of tobacco were found to be as follows
Sample A 24 27 26 21 25 -
Sample B 27 30 28 31 22 36
Can it be said that two samples come from normal populations.
∑b́µj Ž´ % \ ∑b
ºµj ¹º %|i
% = 5, = 6, ˆ = = = 24.6, ¸
ˆ = = = 29
] ^
Solution:
j e
: "# : ¦¦¦ ¦¦¦ , Alternate Hypothesis : "% : ¦¦¦ ¦¦¦ (Two tailed)
Student’s t test
Null Hypothesis ‡! = ‡ ‡! ≠ ‡
= −1.92 ⇒ | | = !. Ë ,
∑ Ž Ž̅ e ƒ ∑ ¹ ¹¦ e %. ƒ%#k Ž̅ ¹¦ i.^ l
= = = 14.35, ( = =
jƒ e ]ƒ^ j
A½ e o ƒ p
j j j
A%i.\] o ƒ p
bj be d f
3. N, the total frequency should be reasonably large, say, greater than 50.
4. No theoretical cell frequency should be less than 5. ( The chi square distribution is frequency is less
than t) . If any theoretical cell frequency is less than 5, then for the application of Ù test, it is pooled
with the preceding or succeeding frequency so that the pooled frequency is more than 5 and finally
adjust for the degree of freedom lost in pooling.
16
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
− test of Goodness of fit
This is a powerful test for testing the significance of the discrepancy between theory and experiment
– discovered by Karl Pearson in 1900. It helps us to find if the deviation of the experiment from theory is
just by chance or it is due to the in adequacy of the theory to fit the observed data.
= ∑-Ü!
Ú- Û-
Û-
, where Ö× – set of observed frequencies, Ø× - Set of expected frequencies. d.f. = −1
1. The following table gives the number of aircraft accidents that occurred during the various days of the
week. Test whether the accidents are uniformly distributed over the week.
Days Mon Tue Wed Thu Fri Sat
k\
Total number of accidents = 83. Based on "# , the expected number of accidents on any day = = 14.
^
Ú Û Ú−Û Ú−Û
Ú Û
Û
14 14 0 0 0
18 14 4 16 1.143
12 14 -2 4 0.286
11 14 -3 9 0.643
15 14 1 1 0.071
14 14 0 0 0
2.143
= ∑-Ü!
Ú- Û-
= . !ÇÉ , d.f. = − 1 = 6 − 1 = 5 at 5% LOS = 11.07
Û-
Calculated Ù < tabulated Ù , is accepted. The accidents are uniformly distributed over the week.
2. The theory predicts the proportion of beans, in the four groups A, B, C, and D should be 9 : 3 : 3 : 1. In
an experiment with 1600 beans the numbers in the four groups were 882, 313, 287, and 118. Does the
Ú Û Ú−Û Ú−Û
Ú Û
Û
9
× 1600 = 900
16
882 -18 324 0.36
3
× 1600 = 300
16
313 13 169 0.563
3
× 1600 = 300
16
287 -13 169 0.563
1
× 1600 = 100
16
118 18 324 3.24
4.726
= ∑-Ü!
Ú- Û-
= Ç. È Ä, d.f. = − 1 = 4 − 1 = 3 at 5% LOS = 7.81
Û-
Calculated Ù < tabulated Ù , is accepted. The experimental results support the theory.
3. Fit a binomial distribution for the following data and also test the goodness of fit. Find the parameters
of the distribution.
‡
›
0 1 2 3 4 5 6 Total
5 18 28 12 7 6 4 80
Solution : Fitting a binomial distribution means assuming that the given distribution is approximately
To find the binomial frequency distribution H + = , which fits the given data, we require , € • =.
binomial and hence finding the probability mass function and the finding the theoretical frequencies.
We assume = total frequency = 80 and = no. of trials = 6 from the given data.
Þ
0 1 2 3 4 5 6 Total
Þ
5 18 28 12 7 6 4 80
0 18 56 36 28 30 24 192
17
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
∑ –Ž %l
̅= ∑–
= k#
= 2.4 , = = 2.4 ⇒ 6= = 2.4 , = = 0.4, H = 1 − = = 0.6
Theoretical frequencies are given by N > I = = Ž =Ž H Ž , = 0,1, …
80 > I = 0 = 80 × 6 # 0.4 # 0.6 ^ # = 3.73, 80 > I = 1 = 80 × 6 % 0.4 % 0.6 ^ % = 14.93
80 > I = 2 = 80 × 6 0.4 0.6 ^ = 24.88, 80 > I = 3 = 80 × 6 \ 0.4 \ 0.6 ^ \ = 22.12
80 > I = 4 = 80 × 6 i 0.4 i 0.6 ^ i = 11.06, 80 > I = 5 = 80 × 6 ] 0.4 ] 0.6 ^ ] = 2.95
80 > I = 6 = 80 × 6 ^ 0.4 ^ 0.6 ^ ^ = 0.33
Û-
X 0 1 2 3 4 5 6 Total
4 15 25 22 11 3 0 80
The 1st class is combined with the second and the last 2 classes are combined with the last but 2nd class in
order to make the expected frequency in each class ≥ 5. Thus, after regrouping, we have
Ú- 23 28 12 17
Û-
H# : The given distribution is approximately binomial distribution.
19 25 22 14
Ú Û Ú−Û Ú−Û
Ú Û
Û
23 19 4 16 0.8421
28 25 3 9 0.36
12 22 -10 100 4.5455
17 14 3 9 0.6429
6.39
= ∑-Ü!
Ú- Û-
= Ä. ÉË, d.f. = − à = 4 − 2 = 2 at 5% LOS = 5.99, Calculated Ù > tabulated Ù ,
Û-
is rejected. The binomial fit for the given distribution is not satisfactory.
4. Fit a Poisson distribution for the following distribution and also test the goodness of fit.
‡
›
0 1 2 3 4 5 Total
142 156 69 27 5 1 400
á ³â ãä
Solution : > I = = , = 0,1, … ∞
Ž!
0 1 2 3 4 5 Total
Þ 142 156 69 27 5 1 400
Þ 0 156 138 81 20 5 400
∑ –Ž i##
æ= ̅= ∑–
= = 1 , = 400
i##
á ³â ãä i## á ³j %ä
Theoretical frequencies are given by > I = = Ž!
= Ž!
, = 0,1, … ∞
i## á ³j %c i## á ³j %j
400 > I = 0 = = 147.15, 400 > I = 1 = = 147.15
#! %!
i## á ³j %e i## á ³j %†
400 > I = 2 = = 73.58 , 400 > I = 3 = = 24.53
! \!
i## á ³j %} i## á ³j %d
400 > I = 4 = = 6.13 , 400 > I = 5 = = 1.23
i! ]!
Ö× 142 156 69 27 5 1
Ø×
The last 3 classes are combined into one, so that the expected frequency in that class may be ≥ 10.
147 147 74 25 6 1
Ö× 142 156 69 33
Ø× 147 147 74 32
Ú Û Ú−Û Ú−Û
Ú Û
Û
142 147 -5 25 0.17
156 147 9 81 0.55
69 74 -5 25 0.34
33 32 1 1 0.03
1.09
18
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
= ∑-Ü!
Ú- Û-
Û-
= !. Ë, d.f. = − à = 4 − 2 = 2 at 5% LOS = 5.99,
Calculated Ù > tabulated Ù , is accepted. The Poisson fit for the given distribution is satisfactory.
€+è ç+•
Degree of freedom = ª − 1 è − 1 , where ª − number of rows, è − number of colums.
5. On the basis of information given below about the treatment of 200 patients suffering from a disease,
state whether the new treatment is comparatively superior to the conventional treatment.
Favourable Not Favourable Total
New 60 30 90
Conventional 40 70 110
90 × 100 90 × 100
Ø 60 = = 45 Ø 30 = = 45
200 200
90
Ú Û Ú−Û Ú−Û
Ú Û
Û
60 45 15 225 5
30 45 -15 225 5
40 55 -15 225 4.09
70 55 15 225 4.09
18.18
= ∑-Ü!
Ú- Û-
Û-
= !š. !š , d.f. = ª − 1 è − 1 = 2 − 1 2 − 1 = 1 at 5% LOS = 3.841.
Calculated Ù > tabulated Ù , is rejected. New and conventional treatment are not independent.
6. Given the following contingency table for hair colour and eye colour. Find the value of chi square. Is
there good association between the two.
Hair Colour
Total
Fair Brown Black
Blue 15 5 20 40
Eye Colour Grey 20 10 20 50
Brown 25 15 20 60
Solution: H# : The two attributes Hair colour and eye colour are independent.
Total 60 30 60 150
19
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
60 × 40 30 × 40 60 × 40
Ø 15 = = 16 Ø 5 = =8 Ø 20 = = 16
150 150 150
40
60 × 50 30 × 50 60 × 50
Ø 20 = = 20 Ø 10 = = 10 Ø 20 = = 20
150 150 150
50
60 × 60 30 × 60 60 × 60
Ø 25 = = 24 Ø 15 = = 12 Ø 20 = = 24
150 150 150
60
60 30 60 150
Ú Û Ú−Û Ú−Û
Ú Û
Û
15 16 -1 1 0.0625
5 8 -3 9 1.125
20 16 4 16 1
20 20 0 0 0
10 10 0 0 0
20 20 0 0 0
25 24 1 1 0.042
15 12 3 9 0.75
20 24 -4 16 0.666
3.6458
= ∑-Ü!
Ú- Û-
= É. ÄÇ4š , d.f. = ª − 1 è − 1 = 3 − 1 3 − 1 = 4 at 5% LOS = 9.488.
Û-
Calculated Ù < tabulated Ù , is accepted. The hair colour and eye colour are independent.
UNIT – 4
QUEUEING THEORY
Syllabus
• Introduction to Markovian queueing models
• Single Server Model with Infinite system capacity - é/é/1 ∶ ∞/ÑêÑÖ
• Single Server Model with Finite System Capacity – é/é/1 ∶ /ÑêÑÖ
INTRODUCTION
History : A.K.Erlang (1909) – “The Theory of probabilities and telephone conversations”.
All of us have experienced the annoyance of having to wait in line.
Example:1. We wait in line in our cars in traffic jams. 2. We wait in line of barber shops or beauty parlors.
3. We wait in line at supermarket to check out.
Why then is there waiting?
There is more demand for service that there is facility for service available.
Why is this so?
1. There may be a shortage of available servers.
2. There may be a space limit to the amount of service that can be provided.
Question : 1. How long must a customer wait? 2. How many people will form in the line?
Answer: Queuing theory attempts to answer these questions through detailed mathematical analysis.
Customer: The term ‘Customer’ is used in a general sense and does not imply necessarily a human
customer.
E.g.: 1. An Air plane waiting in line to take off. 2. A Computer program waiting to be run as a time
shared basis.
20
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
Characteristics of Queuing Process
1. Arrival pattern of Customers
2. Service pattern of Servers
3. Queue discipline
4. System capacity
5. Number of service channels
6. Number of service stages
1. Arrival Pattern of Customer : (i) Bulk or Batches (ii) Balked (iii) Reneged (iv) Jockey
(i) Bulk or Batches : More than one arrival can be entering the system simultaneously, the input is said to
occur in bulk or batches.
(ii) Balked : If customer decides not to enter the queue upon arrival, he is said to have balked.
(iii) Reneged : A Customer may enter the queue, but after a time lose patience and decide to leave. In this
case he is said to reneged.
(iv) Jockey : Two or more parallel waiting lines, customers may switch from one to another (i.e) Jockey
for position.
2. Service Pattern of Services
If the system is empty, the service facility is idle. Service may also be deterministic (or) probabilistic.
Service may also be single (or) batch one generally thinks of one customer being served at a time by a
given server, but there are many situations where customer may be served simultaneously by the same
server. E.g.: 1. Computer with parallel processing. 2. People boarding a train.
The service rate may depend on the number of customer waiting for service. A server may work faster if
sees that the queue is building up (or) conversely, he may get flustered and became less efficient. The
situation in which service depends on the no. of customers waiting is referred to as state dependent service.
3. Queue Discipline
(i) First Come First Served (FCFS) or First In First Out (FIFO)
(ii) Last Come First Served (LCFS) or Last In First Out (LCFO)
(iii) Random Selection for Services (RSS)
(iv) Priority (a) Preemptive (b) Non- Preemptive
(a) Preemptive : The customer with the highest priority is allowed to enter service immediately even if a
customer with lower priority is already in service when the higher priority customer enters system.
(b) Non - preemptive : The highest priority customer goes to the head the queue but cannot get into service
until the customer presently in service is completely, even through this customer has a lower priority.
4. System Capacity : (i) Finite (ii) Infinite
(i) Finite: A queue with limited waiting room, so that when the time reaches a certain length, no further
customer are allowed to enter until space becomes available by a service completion.
(ii) Infinite: A queue with unlimited waiting room.
5. Number of Service Channels
(i) Single channel system
(ii) Multiple channel systems.
(i) Single Channel System
21
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
(ii) Multiple Channel System
1. é/é/1 ∶ ∞/ÑêÑÖ
We look for probabilistic model only
2. é/é/1 ∶ /ÑêÑÖ
22
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
SINGLE SERVER MODEL WITH INFINITE SYSTEM CAPACITY - ë/ë/! ∶ ∞/ÌìÌÚ
ã ã
1. ># = 1 − • and > = o•p ># , æ = €ªªíî€ï ª€(ð, = ðªîíè𠪀(ð
ã
2. Probability that the system is busy = 1 − ># =
•
ó
3. Expected number of customers in the system : Lò = ô ó
ãe
4. Expected number of customers in the queue: õG = • • ã
•
5. Expected number of customers in non empty queues: õ = • ã
%
6. Expected waiting time a customer in the system: ö- =
• ã
ã
7. Average waiting time that a customer in the queue: öG =
• • ã
ã ÷ƒ%
8. Probability that the number of customers in the system exceeds k : > > à = o• p
ã ÷
9. Probability that the number of customers in the system greater than or equal to k : > ≥ à = o• p
10. Probability that the waiting time of a customer in the system exceeds t : > ø > ( = ð • ã +
ã
11. Probability that the waiting time of a customer in the queue exceeds t : > ø > ( = ð • ã +
•
12. Probability density function of the waiting time in the system: f w = μ − λ e ô ó ú
Little’s formula: õ- = æ ö- , õG = æ öG , ö- = öG + , õ- = õG +
% ã
• •
SINGLE SERVER MODEL WITH INFINITE SYSTEM CAPACITY - ë/ë/! ∶ ∞/ÌìÌÚ
1. Customers arrive at a one man barber shop according to a Poisson process with a mean inter arrival
time of 20 minutes. Customers spend an average of 15 minutes in the barber chair. If an hour is used as
the unit of time, then
(i) What is the probability that a customer need not wait for a hair cut?
(ii) What is the expected number of customers in the barber shop and in the queue?
(iii) How much time can a customer expect to spend in the barbershop?
(iv) Find the average time that a customer spends in the queue?
(v) What is the probability that there will be more than 6 customers?
(vi) What is the probability that there will be 6 or more customers waiting for service?
(iv) Average time that a customer spends in the queue: öG = • =i = i = 0.75 hour
ã \ \
• ã i \
(v) The probability that there will be more than 6 customers:
ã ÷ƒ% \ ^ƒ%
> >à =o p ⇒> >6 =o p = 0.1335
• i
23
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
(vi) The probability that there will be 6 or more customers waiting for service:
ã ÷ \ ^
> ≥ à = o• p ⇒ > ≥ 6 = oip = 0.1779
(vii) The probability that the waiting time in the system is greater than 12 minutes?
je
> ø > ( = ð • ã + ⇒ > ø > 12 = ð i \ ×fc = ð #. = 0.8187
(viii) The probability that the waiting time in the queue, is greater than 12 minutes?
je
ã \ \
> ø > ( = ð • ã +
⇒ > ø > 12 = o p ð i \ ×
fc = o pð #.
= 0.61405
• i i
2. If People arrive to purchase cinema tickets at the average rate of 6 per minute at a one man counter,
and it takes an average of 7.5 seconds to purchase a ticket. If a person arrives 2 minutes before the
picture starts and it takes exactly 1.5 minutes to reach the correct seat after purchasing the ticket,
(i) can he expect to be seated for the start of the picture?
(ii) What is the probability that he will be seated for the start of the picture?
(iii) > ø < ( = 99% = 0.99 ⇒ 1 − > ø > ( = 0.99 ⇒ > ø > ( = 0.01 ⇒ ð • ã + = 0.01 ⇒
ð k ^ + = 0.01 ⇒ ð + = 0.01 ⇒ −2( = ln 0.01 ⇒ −2( = −4.6 ⇒ ( = 2.3 minute
> ticket purchasing time < 2.3 = 0.99
>Åtotal time to get the ticket and to go to the seat < 2.3 + 1.5 Æ = 0.99
∴ The person must arrive at least 2.64 minutes early so as to be 99% sure of seeing the start of the picture.
3. The arrivals at the counter in a bank occur in accordance with a Poisson process at an average rate of 8
per hour. The duration of service of a customer has an exponential distribution with a mean of 6
minutes. Find the probability that an arriving customer (i) Has to wait (ii) Finds 4 customers in the
(ii) Probability that there are 4 customers in the system = Pi = o%#p o1 − %#p = 0.08192
k
(iii) Probability that a customer has to spend less than 15 minutes in the bank: > ø > ( = ð • ã +
1 1 %
> ö- < 15 minutes = > ‚ö- < hour„ = 1 − > ‚ö- > hour„ = 1 − ð i = 0.3935
%# k o p
4 4
4. Customers arrive at a watch repair shop according to a Poisson process at a rate of one per every 10
minutes and the service time is an exponential random variable with mean 8 minutes.
(i) Find the average number of customers in the shop.
(ii) Find the average time a customer spends in the shop.
(iii) Find the average number of customers in the queue.
24
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
ãe ^e %^
(iii) The average number of customers in the queue: õG = = jd jd =
• • ã o ^p ]
e e
, æ =
÷
¤
Average waiting time of a customers in the queue : öG =
ã
SINGLE SERVER MODEL WITH FINITE SYSTEM CAPACITY - ë/ë/! ∶ /ÌìÌÚ
1. Patients arrive at a clinic according to Poisson distribution at a rate of 60 patients per hour. The waiting
room does not accommodate more than 14 patients. Investigation time per patient is exponential with
mean rate of 40 per hour.
(i) Determine the effective arrival rate at the clinic.
(ii) What is the probability that an arriving patient will not wait?
investigation)
â
o% p
(i) Effective arrival rate λ = ′
1 − ># , Where ># = â Êj , æ≠
% o p
fc
o% p
># = }c
fc jdÊj
= 0.0007624 , λ′ = 40 1 − 0.0007624 = 39.9695 per hour.
% o p
}c
25
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
(ii) P a patient will not wait = P# = 0.0007624
(iii) Expected waiting time until a patient is discharged from the clinic: ö- =
¤•
ã′
Êj
fc jdÊj
ƒ% o p %]ƒ% o p
Lò = o p− =o p− = 13 patients, ö- = = 0.3203 hour
^# %i
λ
λ }c
λ Êj i# ^# fc jdÊj \l.l^l]
µ
% o p % o p
}c
µ λ
µ
2. At a railway station, only one train is handled at a time. The railway yard is sufficient only for two trains
to wait while other is given signal to leave the station. Trains arrive at the station at an average rate of 6
per hour and the railway station can handle them on an average of 12 per hour. Assuming Poisson
arrivals and exponential service distribution, find the steady state probabilities for the number of trains
in the system. Also find the average waiting time of a new train coming into the yard. If the handling
Steady state probabilities for the number of trains in the system = >% , > € • >\
â f
o% p o% p
> = o p ># , Where ># = = = 0.5333, æ ≠
ã je
• â Êj f }
% o p % o p
je
^ % ^ \
>% = o% p 0.5333 = 0.2667, > = o% p 0.5333 = 0.1333, >\ = o% p 0.5333 = 0.0667
^
% o p % o p
je
µ λ
Case (ii): If the handling rate is reduced to half, then æ = 6 trains/hr, = 6 trains/hr, à = 2 + 1 = 3
µ
Steady state probabilities for the number of trains in the system = >% , > € • >\
> = , >% = = , > = , >\ =
% % % % %
÷ƒ% \ƒ% i i i
Average waiting time of a new train coming in the yard : ö- =
¤•
ã′
Êj
jc dÊj
ƒ% o p ]ƒ% o p
Lò = o p− =o p− = 0.492
%#
λ
λ †c
Êj \# %# jc dÊj
µ
% o p % o p
†c
µ λ λ
0.667 = 0.00274.
‰ \#
4. A one person barber shop has 6 chairs to accommodate people waiting for a hair cut. Assume that
customers who arrive when all the 6 chairs are full leave without entering the barber shop. Customers
arrive at the average rate of 3 per hour and spend an average of 15 minutes in the barber chair.
(i) What is the probability that a customer can get directly into the barber chair upon arrival?
(ii) What is the expected number of customers waiting for a hair cut?
(iii) How much time can a customer expect to spend in the barber shop?
26
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
â †
o% p o% p
># = â Êj = }
† yÊj
= 0.2778, æ ≠
% o p % o p
}
% o p % o p
}
µ λ λ
µ
ã .kl
õG = õ- − •
= 2.11 − i
= 1.3875
¤• .%%
(iv) ö- = = = 0.7301/ℎ©þª
ã .kl
ã | \ |
(v) > € èþ (© ðª í (þª ð• €ø€¸ = > ¸ (ð í Þþïï = >| = o•p ># = oip 0.2778 = 0.037
Hence 3.7% of potential customers are turned away.
UNIT – 5
MARKOV CHAINS
Syllabus
• Introduction to Stochastic process, Markov process, Markov chain one step & n-step Transition
Probability.
• Transition Probability Matrix and Applications
• Chapman Kolmogorov theorem (Statement only) – Applications.
• Classification of states of a Markov chain – Applications
INTRODUCTION
ŸI , ( which are functions of a real variable ( (time). Here ∈ ¶ (sample space) and ( ∈ (index set)
Random Processes or Stochastic Processes : A random process is a collection of random variables
and each ŸI , ( is a real valued function. The set of possible values of any individual member is called
state space.
Classification : Random processes can be classified into 4 types depending on the continuous or discrete
nature of the state space S and index set T.
1. Discrete random sequence : If both S and T are discrete
2. Discrete random process : If S is discrete and T is continuous
3. Continuous random sequence : If S is continuous and T is discrete
4. Continuous random process : If both S and T are continuous.
>ŸI ( ≤ /I ( = then the process ŸI ( is called a Markov process. That is, if the future
behaviour of the process depends only on the present state and not on the past, then the random process is
27
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
- Step Transition Probability : The conditional probability >× = >ÂI = € /I# = €× Ã is called n –
step transition probability.
Chapman Kolmogorov Equations : If P is the tpm of a homogeneous Markov chain, the +”
step tpm >
is equal to > . That is, >× = »>× ¼ .
Regular Matrix : A stochastic matrix P is said to be a regular matrix, if all the entries of > are positive. A
homogeneous Markov chain is said to be regular if its tpm is regular.
Irreducible Chain and Non - Irreducible (or) Reducible: If for every í, we can find some such that
Classification of States of a Markov Chain
>× > 0, then every state can be reached from every other state, and the Markov chain is said to be
irreducible. Otherwise the chain is non – irreducible or reducible.
Return State : State í of a Markov chain is called a return state, if >× > 0 for some > 1.
Periodic State and Aperiodic State : The period •× of a return state í is the greatest common divisor of all
such that >× > 0. That is, •× = ! "o : >×× > 0 p. State í is periodic with period •× if •× > 1 and
aperiodic if •× = 1.
Recurrent (Persistent) State and Transient : If ∑#Ü% Þ×× = 1, the return to state í is certain and the state í
is said to be persistent or recurrent. Otherwise, it is said to be transient.
Null Persistent and Non – null Persistent State : ×× = ∑#Ü% Þ×× is called the mean recurrence time of
the state í. If ×× is finite, the state í is non null persistent. If ×× = ∞ the state í is null persistent.
Ergodic State: A non null persistent and aperiodic state are called ergodic.
Theorem used to classify states
1. If a Markov chain is irreducible, all its states are of the same type. They are all transient, all null
persistent or all non null persistent. All its states are either aperiodic or periodic with the same period.
2. If a Markov chain is finite irreducible, all its states are non null persistent.
PROBLEMS
6. A man either drives a car or catches a train to go to office each day. He never goes 2 days in a row by
train but if he drives one day, then the next day he is just as likely to drive again as he is to travel by
train. Now suppose that on the first day of the week, the man tossed a fair die and drove to work if and
only if a 6 appeared. (i) Find the probability that he takes a train on the 3rd day (ii) Find the probability
that he drives to work in the long run.
% %% 0 1 %% %\
The 3rd day sate distribution is > \
=> >= % % =
% % i i
%%
(i) P(he travels by train on 3rd day) =
i
28
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
(ii) The limiting form or long run probability distribution. %? = %
0 1
[&% & ] % % = [&% & ]
&% + & = 1
(2)
& + & = 1 ⇒ % =
(3)
i È
| !!
Sub. (1) in (3), (4)
&% + = 1 ⇒ %! =
È Ç Ç
, P(he studies in the long run) =
!! !! !!
Sub. (4) in (3), .
!
É
8. Suppose that the probability of a dry day following a rainy day is and that the probability of a rainy day
!
following a dry day is . Given that May 1 is a dry day, find the prob. that (i) May 3 is also a dry day (ii)
May 5 is also a dry day.
" )
Solution : Let D – Dry day and R - Rainy day.
"
% %
> = *% + . Initial state probability distribution is the probability distribution on May 1. Since May 1 is
)
\ \
% %
> = [1 0] *% +=
% %
a dry day. P(D) = 1 and P(R) = 0. > %
= [1 0], > => %
,
\ \
% %
*% += *% +=
] | l i\ l i\ %|\ ]l
> i
=> \
> = ,> i
> =
% % | | | | i\ i\
,
\ \ \ \
!ÈÉ
@ ë±· 4 - ± ™²· ™±· =
ÇÉ
.
29
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
9. A salesman territory consists of 3 cities A, B and C. He never sells in the same city on successive days. If
he sells in city A, then the next day, he sells in city B. However, if he sells in either B or C, the next day
he is twice as likely to sell in city A as in the other city. In the long run, how often does he sell in each of
the cities?
0 1 0
A B C
’ %
Solution : The tpm of the given problem is > = - . \ 0 \ /. The limiting form or long run prob.
%
0
\ \
distribution. %? = %
0 1 0
%
[&% & &\ ] . \ 0 \/ = [&% & &\ ]
%
\ \
0
\
& + \ &\ = &% ⇒ 2 & + 2 &\ = 3&% ⇒ 3&% − 2 & − 2 &\ = 0 (1)
&% + \ &\ = & ⇒ 3&% + &\ = 3& ⇒ 3&% − 3& + &\ = 0
%
(2)
& = &\ ⇒ & = 3&\
%
\
&% + & + &\ = 1
(3)
I =1
Let us see how the First Row of the tpm is filled.
I ƒ% = 1 íÞ 1 €==ð€ª í + 1 +” (ªí€ï
= 2 íÞ 1 €==ð€ª í + 1 +” (ªí€ï
= 3 íÞ 1 €==ð€ª í + 1 +” (ªí€ï
= 4 íÞ 1 €==ð€ª í + 1 +” (ªí€ï
= 5 íÞ 1 €==ð€ª í + 1 +” (ªí€ï
= 6 íÞ 1 €==ð€ª í + 1 +” (ªí€ï
Now, in the + 1 +” trial, each of the numbers 1, 2, 3, 4, 5, 6 occurs with probability .
%
^
Here I = 2
Let us see how the Second Row of the tpm is filled.
êÞ + 1 +” (ªí€ï ªð þï( í 1 ©ª 2, I ƒ% = 2
êÞ + 1 +” (ªí€ï ªð þï( í 3, I ƒ% = 3
êÞ + 1 +” (ªí€ï ªð þï( í 4, I ƒ% = 4
êÞ + 1 +” (ªí€ï ªð þï( í 5, I ƒ% = 5
êÞ + 1 +” (ªí€ï ªð þï( í 6, I ƒ% = 6
If I = 2, > I ƒ% = 2 = and > I ƒ% = à = , à = 3, 4, 5, 6.
%
^ ^
30
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
Proceeding similarly, the tpm is
+ 1 +” (€(ð
3 ^ ^ ^ ^ ^ ^ 6 3 ^ ^ ^ ^ ^ ^ 6 3 ^ ^ ^ ^ ^ ^ 6 3 6
% % % % % % % % % % % % % % % % % %
% \ ] | l %%
20 % % % %5 20 % % % %5 20 % % % %5 2 %%5
\^ \^ \^ \^ \^ \^
2 ^ ^ ^ ^ ^5 2 ^ ^ ^ ^ ^5 2 ^ ^ ^ ^ ^5 20 \^ \^ \^ \^ \^5
i ] | l
20 0 \ % % %5 20 0 \ % % %5 20 0 \ % % %5 2
+” 2 ^ ^ ^ ^5 2 ^ ^ ^ ^5 2 ^ ^ ^ ^5 0 0 5
l | l %%
>= > = = 2 \^ 5
2 0 0 0 5 20 0 0 5 20 0 0 5
i % % i % % i % % \^ \^ \^
5 2 0 0 0 \^ \^ \^ 5
,
%^ l %%
2 5 2 5 2
2 0 0 0 0 ^ ^ 5 2 0 0 0 0 ^ ^ 5 2 0 0 0 0 ] %% 5
^ ^ ^ ^ ^ ^ ^ ^ ^
2 0 0 0 0 ^ ^ 5
] % ] % ] %
2 2 \^ \^ 5
%5 2 %5 2 %5
1 0 0 0 0 0 ^ 4 1 0 0 0 0 0 ^ 4 1 0 0 0 0 0 ^ 4 1 0 0 0 0 0 1 4
% % % % % %
The initial probability distribution is > #
=
^ ^
^ ^ ^ ^
> I = 6 = ∑^×Ü% > I = 6/I# = í > I# = í = ∑^×Ü% >×^ = [>%^ + > ^ + >\^ + >i^ + >]^ + >^^ ]
% %
^ ^
% %% %% %% %% %% l%
> I =6 = + + + + +1 =
^ \^ \^ \^ \^ \^ %^
11. The transition probability matrix of a Markov chain ŸÍ , = !, , … having 3 states 1, 2, 3 is @=
.! .4 .Ç
7 .Ä . . 8 and the initial distribution @ = . È, . , . ! .
.É .Ç .É
Find (i) @ Í = É, Í! = É, Í = (ii) @ Í = É (iii) @ ÍÉ = , Í = É, Í! = É, Í = .
Solution:
(i) > I = 3, I% = 3, I# = 2 = > I = 3/ I% = 3, I# = 2 > I% = 3, I# = 2
= > I = 3/ I% = 3 > I% = 3, I# = 2 = >\\ > I% = 3, I# = 2
%
2! ! !5
, = 2Ç Ç5
& the initial distribution , = o , , p. Find (i) , 9 É = /9 = ! (ii) , 9 =
! ! !
2 !5
É É É
1 Ç4
É
(iii) , 9 = (iv) , 9 É = !, 9 = , 9 ! = !, 9 =
Ç
, 9 ! = !, 9 =
31
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
(i) P X\ = 2/X = 1 = >%
Solution:
%
=i
%
3i 06 3 06 3%^ %^ %^6
\ % \ % %# ] %
2% %5 2%%5 2] k \5
i i i
> = 2i i5 2ii5
= 2%^ %^ %^5
% %
2 %5 2 %5 2\ l i5
10 4 10i4 1%^ %^ %^4
\ \
i i i
(iii) > I = 2, I% = 1, I# = 2 = > I = 2/ I% = 1, I# = 2 > I% = 1, I# = 2
= > I = 2/ I% = 1 > I% = 1, I# = 2 = >% > I% = 1, I# = 2
%
% % % %
= > %% >% % > %% > I# = 2 = o p o p o p o p = 0.0052
i i i \
!
13. Find the nature of the states of the Markov chain with the tpm @ = * +.
! !
!
% %
0 1 0 0 1 0 0 1 0 0
Solution : > = * +, > = > > = * +* + = . 0 1 0/ ,
% % % % % %
0 0 0
% %
0 1 0 0 1 0 0 1 0 0
% % % %
0 0 1 0 0 1 0 0
>\ = > > = .0 1 0/ * +=* + = >, >i = >\ > = .0 1 0/ = >
% % % %
0 0
% % % %
0 0 1 0 0 1 0 0
>%% > 0, >% > 0, >%\ > 0, > % > 0, > > 0, > \ > 0 , >\% > 0, >\ > 0, >\\ > 0
% % \ %
The chain is irreducible. Also since there are only 3 states, the chain is finite. That is, the chain is finite and
irreducible.
State 2: > > 0, > > 0, > > 0… , >ðªí©• ©Þ (€(ð 2 = ! " 2, 4, 6 … = 2
i ^
State 3: >\\ > 0, >\\ > 0, >\\ > 0, … >ðªí©• ©Þ (€(ð 3 = ! " 2, 4, 6 … = 2
i ^
All the states 1, 2, 3 have period 2. That is, they are periodic. All the states are non null persistent, but the
states are periodic. Hence all the states are not ergodic.
32
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]
14. Three boys A, B, C are throwing a ball to each other. A always throw the ball to B &B always throws
to C but C is just as likely to throw the ball to B as to A. Show that the process is Markovian. Find
the transition matrix & classify the states.
Solution:
’ 0 1 0
A B C
> = - *0% 0% 1+ ,
0
3 06
% %
0 1 0 0 1 0 0 0 1 0 0 1 0 1 0
1+ = 20 %5
% % % %
> = > > = *0% 0% 1+ *0 0 1+ = . 0/ , >\ = > > = . 0/ * 0 0
2 5
%
2% %5
% % % %
0 0 0
% %
0
% % 0
1i 4
%
i
3 06 0 30 6 30 6 0 1 0 3i 6
% % % % % % % % %
1 0
2 %5 0 0 1+ = 2 % %5 2% %5 0 0 1 2% %5
i
> = > > = 20 5 *% 2i 5 , > = > > = 2 i 5 *% % + = 2i i5
i \ % % ] i % %
2% %5 2% %5 2% %5 2% %5
% i i
0 0
1i 4 1i i4 1i i4 1k 4
% % % \
i k
>%% > 0, >% > 0, >%\ > 0 , > % > 0, > > >0, 0, > \ >\%
> 0, >\ > 0, >\\ > 0
\ % % % %
The chain is irreducible. Also since there are only 3 states, the chain is finite. That is, the chain is finite and
irreducible.
>ðªí©• ©Þ ’ = ! " 3, 5, … = 1
All the states are non null persistent.
1st state A: >%% > 0, >%% > 0, …
\ ]
3rd state C: >\\ > 0, >\\ > 0, >\\ > 0, … >ðªí©• ©Þ = ! " 2, 3, 4 … = 1
2
\ i
All the states A, B, C have period 1. That is, they are aperiodic.
All the states are aperiodic and non null persistent, they are ergodic.
Regards!
Dr. P. GodhandaRaman
Assistant Professor
Department of Mathematics
SRM University, Kattankulathur – 603 203
Email : [email protected], Mobile : 9941740168
33
Dr. P. Godhandaraman, Assistant Professor, Dept of Maths, SRM University, Kattankulathur, Mobile: 9941740168, Email: [email protected]