Professional Documents
Culture Documents
K OLHAPUR
S.Y. B. T ECH .
C OMPUTER S CIENCE AND E NGINEERING
Prepared by
Contents
1 Measures of Central Tendency 2
1.1 Arithmetic Mean: . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Median . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Standard Deviation 4
3 Random Variable 5
3.1 Discrete Random Variable . . . . . . . . . . . . . . . . . . . . 6
3.2 Continuous Random Variable . . . . . . . . . . . . . . . . . . 6
4 Binomial Distribution 13
5 Poisson Distribution 19
6 Normal Distribution 22
6.0.1 Standard Normal Table (Z) . . . . . . . . . . . . . . . 31
7 Assignment No. 4 32
8 M.C.Q. 33
CONTENTS 1
Mr. S.S. Salgare
2) Median
3) Mode
∑x x + x2 + · · · + x n
A.M. = = 1
n n
∑x 20 + 22 + 25 + 28 + 30
Solution: A.M.= = = 25
n 5
∑xf x f + x2 f 2 + · · · + x n f n
A.M. = = 1 1
∑f f1 + f2 + · · · + fn
Number (x) 8 10 15 20
Frequency (f) 5 8 8 4
∑xf ×5 + 10 × 8 + 15 × 8 + 20 × 4 320
Solution: A.M.= = = = 12.8
∑ f 5 + 8 + 8 + 4 25
x 13 14 15 16 17 18
f 12 14 22 14 9 4
∑xf
Solution: A.M.= = 15.08
∑f
c) Continuous Distribution: When continuous distribution is given the
A.M. is given by
∑ fd
A.M. = a + i
∑f
x−a
Where a = assumed mean and d = deviation=
i
Example 5 Find A.M. for the following data
class 0-10 10-20 20-30 30-40 40-50
freq 7 8 20 10 5
∑ fd −2
A.M.= a + i = 25 + 10 = 24.6
∑f 50
1.2 Median
Median is defined as the measure of the central item when they are ar-
ranged in ascending or descending order of magnitude
a) Whwn the total number of the items is odd and equal to n, then the
value of 21 (n + 1)th item gives the median.
b) When the total number of the frequencies is even, say n then threre are
th
two middle items and so the mean of the values of 12 nth and 12 n + 1
items is the median.
3, 5, 12
3, 5, 7, 12, 13, 14, 21, 23, 23, 23, 23, 29, 39, 40, 56
The median is 23
Example 8 Find the median of 3,13,7,5,21,23,23,40,23,14,12,56,23,29
Solution:First we write
3, 5, 7, 12, 13, 14, 21, 23, 23, 23, 23, 29, 40, 56
21 + 23
The median is = 22
2
1.3 Mode
Mode is defined to be the variable which occurs most frequently
Example 9 Find the mode of the following data 0,1,6,7,2,3,7,6,6,2,6,0,5,6,0
Solution: Mode is 6
2 Standard Deviation
r
∑( x − x̄ )
a) Individual items :σ=
N−1
s
∑ f ( x − x̄ )2
b) Discrete Distribution : σ =
∑f
s 2
∑ f d2 ∑ fd
c) Continuous Distribution : σ = − ∑
∑f ∑f
Example 10 Calculate the mean and standard deviation for the following data,
given the age distribution of 542 members
Age in years 20-30 30-40 40-50 50-60 60-70 70-80 80-90
No. of members 3 61 132 153 140 51 2
2 STANDARD DEVIATION 4
Mr. S.S. Salgare
∑ fd −15
A.M.= x̄ = a + × i = 55 + × 10 = 54.72
s ∑f 542 s
2
∑ f d2 ∑ fd −15 2
765
S.D. (σ) = − ∑ = − × 10 = 11.877
∑f ∑f 542 542
Example 11 Find the mean, median, mode and standard deviation of the follow-
ing 15, 21, 21, 25, 30, 35
Solution:We write
15, 21, 21, 25, 30, 35
A.M.= 24.5
21 + 25
Median = = 23
2
Standard
r Deviation is given by
(15 − 24.5)2 + (21 − 24.5)2 + (21 − 24.5)2 + (25 − 24.5)2 + (30 − 24.5)2 + (35 − 24.5)2
σ=
5
σ = 7.1484
3 Random Variable
A variable used to denote the numerical value of the outcome of an exper-
iment is called random variable (r.v.)
e.g.
1) In a toss of die the r.v. X takes the values 1,2,3,4,5,6 i.e. X = {1, 2, 3, 4, 5, 6}
2) In toss of a coin r.v. X takes the values 0 and 1 (the number of heads
obtained) i.e. X = {0, 1}
Remark: A random variable is denoted by the capital letters X, Y, Z, · · ·
etc and particular values which the random variable takes are denoted by
corresponding small letters.
3 RANDOM VARIABLE 5
Mr. S.S. Salgare
X x1 x2 ··· xn Total
P(X) P1 P2 ··· Pn 1
is called the discrete probability distribution for X and it spells out how a
total probability of 1 is distributed over several values of r.v.
3 RANDOM VARIABLE 6
Mr. S.S. Salgare
Solution: Here X is a r.v. which can take values 0,1,2,3. The sample space
S consists of 23 = 8 sample points. i.e. n(S) = 8
No. of heads (X) Favourable events No. of favourable cases Probability P(X)
0 {TTT} 1 1/8
1 {TTH, HTT, THT} 3 3/8
2 {HTH, THH, HHT} 3 3/8
3 {HHH} 1 1/8
1 3 1
Note that ∑ P = + + =1
8 8 8
Example 13 Two dice are rolled at random. Obtain the probability distribution of
the sum of the number on them.
Solution:When two dice are rolled, the sample space S consists of 62 = 36.
Sample points as below
3 RANDOM VARIABLE 7
Mr. S.S. Salgare
Example 14 Five defective bulbs are accidentally mixed with twenty good ones. It
is not possible to just look at a bulbs and tell whether or not it is defective. Find the
probability distribution of the defective bulbs, if four bulbs are drawn at random
from this lot.
Solution: Let
P( X = 0) = P(no defective)
20C4 20 × 19 × 18 × 17 969
= = =
25C4 25 × 24 × 23 × 22 2530
P( X = 4) = P(all defective)
5C4 1
= =
25C4 2530
The probability distribution of the random variable is
X 0 1 2 3 4 Total
969 114 3 4 1
P(X) 1
2530 253 253 253 2530
Example 15 A random variable X has the following probability distribution
X 0 1 2 3 4 5 6 7
P(X) 0 k 2k 2k 3k k2 2k2 7k2+k
3 RANDOM VARIABLE 8
Mr. S.S. Salgare
i) Find k
ii) Evaluate P( X < 6), P( X ≥ 6) and P(3 < X ≤ 6)
1
iii) Find the minimum value of X so that P( X ≤ x ) >
2
Solution:
i)
As ∑P = 1 ⇒ 0 + k + 2k + 2k + 3k + k2 + 2k2 + 2k2 + k = 1
⇒ 10k2 + 9k − 1 = 0
⇒ (10k − 1)(k + 1) = 0
1
⇒ k= Since P( x ) ≥ 0
10
ii)
P ( X < 6) = P ( X = 0) + P ( X = 1) + P ( X = 2) + P ( X = 3) + P ( X = 4) + P ( X = 5)
= 0 + k + 2k + 2k + 3k + k2
= 8k + k2
81
P ( X < 6) = = 0.81
100
Next
P ( X ≥ 6) = P ( X = 6) + P ( X = 7)
= 2k2 + 2k2 + k
9 1
= +
100 100
19
P ( X ≥ 6) = = 0.19
100
Finally
P (3 < X ≤ 6) = P ( X = 4) + P ( X = 5) + P ( X = 6)
= 3k + k2 + 2k2
= 3k + 3k2
33
P (3 < X ≤ 6) = = 0.33
100
iii)
1 1
P ( X ≤ 1) = k = <
10 2
3 1
P( X ≤ 2) = k + 2k = <
10 2
3 RANDOM VARIABLE 9
Mr. S.S. Salgare
5 1
P( X ≤ 3) = k + 2k + 2k = <
10 2
8 1
P( X ≤ 4) = k + 2k + 2k + 3k = >
10 2
1
Thus x = 4 such that P( X < 4) >
2
Example 16 A coin is tossed two times and let X be the number of heads in two
coin tosses. Find the probability distribution.
X 0 1 2 3 4 5 6
P(X) k 3k 5k 7k 9k 11k 13k
1 16 24 33
Ans: k = , P ( X < 4) = , P ( X ≥ 5) = , P (3 < X ≥ 6) =
49 49 49 49
Continuous Probability Function: Let X be a continuous random variable
taking values on the interval [ a, b], a function f ( x ) is said to be the prob-
ability density function (PDF)of the continuous of random variable X if it
satisfies the following properties
i) f ( x ) ≥ 0 for x ∈ [ a, b]
P( a ≤ X ≤ b) = 1
Z b
f ( x ) dx = 1
a
3 RANDOM VARIABLE 10
Mr. S.S. Salgare
ii) If so, determine the probability that the variate having this density will fall in
the interval (1,2).
iii) Also find the cumulative probability function F (z)
Solution
i) Here f ( x ) ≥ 0 for every x. Also
Z ∞ Z ∞ ∞
e− x
Z 0
−x
f ( x ) dx = 0 dx + e dx = =1
−∞ −∞ 0 −1 0
= 0.233
3 RANDOM VARIABLE 11
Mr. S.S. Salgare
Solution
i) Here f ( x ) = 6x (1 − x ) .Clearly f ( x ) ≥ 0 for 0 ≤ x ≤ 1
1
x2 x3
Z 1 Z 1
2
1 1
f ( x ) dx = 6 x−x dx = 6 − =6 − =1
0 0 3 3 0 2 3
Hence f ( x ) is pdf.
2 x
ii) Here f ( x ) = x 2 − .Clearly f ( x ) ≥ 0 for 0 ≤ x ≤ 3
9 2
3
x2 2 2 x3
Z 3
2 3
Z
2 27 2 27
f ( x ) dx = 2x − dx = x − = 9− = × =1
0 9 0 2 9 6 0 9 6 9 6
Hence f ( x ) is pdf.
iii) Here f ( x ) .Clearly f ( x ) ≥ 0 for −∞ ≤ x ≤ ∞
Z ∞ Z ∞ ∞
e− x
Z 0
f ( x ) dx = x
e dx + e −x
= [e x ]0−∞ + =2
−∞ −∞ 0 −1 0
1
Now f ( x ) × is Probability density function.
2
Example 20 Find the value of k if each of the following functions are probability
density function
2
kx (1 − x3 ) 0≤x≤1
a) f ( x ) =
0 otherwisex ≥ 0
3 RANDOM VARIABLE 12
Mr. S.S. Salgare
1
b) f ( x ) = k −∞ ≤ x ≤ ∞
1 + x2
c) f ( x ) = kx4 e− x/2 0≤x≤∞
1 x −m
d) f ( x ) = ke− 2 ( σ ) 0 ≤ x ≤ ∞ and σ > 0 , m is real.
Solution:
x 1
c) Put = t then k =
2 768
x−m 1
d) Put t = then k = √
σ 2πσ
4 Binomial Distribution
Definition 4.1 If
4 BINOMIAL DISTRIBUTION 13
Mr. S.S. Salgare
Note:
2) In a binomial distribution:
Use:
4. were there are two mutually exclusive and exhaustive outcomes and
where trials are finite , the B.D can be used.
Properties
Remark
V (x) npq
For Binomial Distribution = =q≤1
x̄ np
V ( x ) ≤ x̄
4 BINOMIAL DISTRIBUTION 14
Mr. S.S. Salgare
1 1
Solution: Here p = , q = , n = 6, r = 4
2 2
We know
4 BINOMIAL DISTRIBUTION 15
Mr. S.S. Salgare
Example 25 Six dice are thrown 729 times. How many times do you expect at
least three dice to show a 5 or 6?
Solution: In a toss of a single dice
2 1 2
P(5 or 6) = p = = and q =
6 3 3
If 6 dice are thrown simultaneously, n=6
x n− x x 6− x
1 2 1 2
P(x successes) = nCx = 6Cx
3 3 3 3
0 6
1 2 64
P( x = 0) = 6C0
3 3 729
4 BINOMIAL DISTRIBUTION 16
Mr. S.S. Salgare
1 5
1 2 192
P( x = 1) = 6C1
3 3 729
2 4
1 2 240
P( x = 2) = 6C2
3 3 729
P ( x < 4) = 1 − P ( x ≥ 4)
= 1 − [ P( x = 4) + P( x = 5)]
h i
= 1 − 5C4 (0.6)4 (0.4)1 + 5C5 (0.6)5 (0.4)O
= 0.6630
10
Example 27 Find the Binomial distribution if the mean is 5 and variance is .
3
Find P( x = 2)
10
solution Given x̄ = np = 5 and V ( x ) = npq =
3
10
⇒ 5q = ⇒ q = 0674 sop = 0.33
3
5
As np = 5 ⇒n= = 15
0.33
Therefore Binomial distribution = 15Cr (.33)r (0.67)15−r
4 BINOMIAL DISTRIBUTION 17
Mr. S.S. Salgare
Thus
P( x = 2) = 15C2 (0.33)2 (0.67)13
= 0.06268
1
Example 28 The probability that missile will strike the target is . If six missiles
2
are fired, find the probability that (i) exactly two will strike the target (ii) at least
two will strike the target.
Solution:Here
n = number of missiles = 6
1
p = probability that missile strike the target =
5
4
q = probability that missile will not strike the target =
5
By binomial distribution
r 6−r
r n −r 1 4
P( X = r ) = nCr p q = 6Cr
5 5
2 4
1 4
i) P(exactly two will strike the target=p(x=2)=6C2 = 0.2457
5 5
ii)
P(at least two will strike the target) = P ( X ≥ 2)
= 1 − P ( x < 2)
= 1 − [ P( X = 0) + P( X = 1)]
= 0.3447
4 BINOMIAL DISTRIBUTION 18
Mr. S.S. Salgare
5 Poisson Distribution
Introduction:Poisson distribution was discovered by the french mathemati-
cian Poisson in 1837. It is the limiting case of Binomial distribution when
n, the number of trials tends to infinity and p, the probability of success in
each trial remains constant and tends to zero such that np = m
e−m m X
p( X ) = X = 0, 1, 2, . . .
X!
and m(= np) is called parameter of the distribution.
When do we get Poisson distribution: In some cases where an experiment
results in two outcomes success or failure, the number of successes only
can be observed and not the number of failures. We can observe how many
accident occur on the road but we cannot observe how many accidents do
not occur. We can observe how many persons die of cancer but we cannot
observe how many do not die of cancer. In such cases Binomial distribution
cannot be used. In such case we use Poisson distribution.
For Poisson distribution the following conditions must be satisfied (4) n →
∞ p → 0 np = m Properties:
1. The mean of Poisson distribution is =m.
2. The variance of Poisson distribution is =m.
√
3. The S.D. of Poisson distribution is = m
m
4. Recurrence formula for Poisson distribution is P(r + 1) = P (r )
r+1
for r = 0, 1, 2, . . .
Example 30 If the variance of the Poisson distribution is 2, find the probabilities
for X = 1, 2, 3, 4 from the recurrence relation of the Poisson distribution. Also
find P(≥ 4).
Solution: Given variance =m = 2 and Mean= 2
We know that
m
P ( x + 1) = P( x ) for x = 0, 1, 2, . . .
x+1
2
P ( x + 1) = P( x )
x+1
m x e−m
As P( x ) =
x!
20 e−2
P ( x = 0) = = e−2 = 0.1353
0!
5 POISSON DISTRIBUTION 19
Mr. S.S. Salgare
P( x = 0) = 0.1353
2
If x = 0 then P( x = 1) = P( x = 0) = 0.2706
1
2
If x = 1 then P( x = 2) = P( x = 1) = 0.2706
2
2
If x = 2 then P( x = 3) = P( x = 2) = 0.1804
3
2
If x = 3 then P( x = 4) = P( x = 3) = 0.0902
4
P ( x ≥ 4) = p ( x = 4) + P ( x = 5) + . . .
= 1 − ( p ( x = 0) + P ( x = 1) + P ( x = 2) + P ( x = 3)
= 1 − (0.1353 + 0.2706 + 0.2706 + 0.1804)
= 0.1431
e −m mr
Solution: We know that P( X = r ) =
r!
By data
e − m m2 e − m m3
P ( x = 2) = P ( x = 3) ⇒ =
2! 3!
m
⇒ 1=
3
⇒ m=3
e − 3 30
a) P( x = 0) = = e−3 = 0.0498
0!
e − 3 34 e−3 .27
b) P( x = 4) = = = 0.168
4! 4∗2∗1
Example 32 In a certain factory producing cycle tyres, there is a small chance of
1 in 500 tyres to be defective. The tyres are supplied in lot of 10. Using Poisson
distribution calculate the approximate number of lots contaning no defective, one
defective and two defective tyres respectively in a consignment of 10000 lots.
1
Solution: Here p = and n = 10
500
1
As m = np = ∗ 10 = 0.02 Poisson distribution is given by
500
e −m mr
P( x = r ) =
r!
5 POISSON DISTRIBUTION 20
Mr. S.S. Salgare
e −m mr
∴ P (r ) =
r!
e − 2/3 (2/3)r
=
r!
−2/3
∴ P (0) = e
= 0.51
5 POISSON DISTRIBUTION 21
Mr. S.S. Salgare
1
Solution:Here p = 0.01% = and n = 1000
10000
1
∴ m = np = 1000. = 0.1
100000
x 0 1 2 3 4 5 6
f 143 90 42 12 9 3 1
∑ fx
Solution: Here m = ⇒ m = 0.98
∑f
e−0.89 .(0.89)r
x P(X=r)= f=n*p
r!
0 0.411 123
1 0.365 109
2 0.163 49
3 0.048 14
4 0.011 3
5 0.002 1
6 0.003 0
6 Normal Distribution
The normal distribution is continuous distribution. It can be derived from
the Binomial Distribution in the limiting case when n, the number of trials
is very large. The general equation of normal distribution is given by
!2
1 x − x̄
1 −
f (x) = √ e 2 σ
σ 2π
where the variable x can assume all values from ∞ to ∞
6 NORMAL DISTRIBUTION 22
Mr. S.S. Salgare
are called parameter of the distribution and x is called the normal variate
and f ( x ) is called probability density function (P.D.F)
The graph of the normal distribution is called the Normal curve. It is bell-
shaped and symmetrical about the mean x̄. The two ends of the curve ex-
tend to ∞ and ∞ towards the positive and negative direction of the X-axis
respectively and gradually approach the X-axis without meeting it.
Graph
The line x = x̄ mean divides the area under the normal curve above X-axis
into two equal parts. The area under the normal curve between any two
given ordinates x = x1 and x = x2 represents the probability of values
falling into the given interval. The total area under the normal curve above
the X-axis is 1.
a) f ( x ) ≥ 0
Z ∞
b) f ( x ) dx = 1 i.e. total area under the normal curve above X-axis is 1.
−∞
6 NORMAL DISTRIBUTION 23
Mr. S.S. Salgare
1 z2
f (z) = √ e− 2
2π
It is free from any parameter. This helps us to compute areas under the
normal probability curve by making use of standard tables.
Note:
1) If F (z) is the probability density function for the normal distribution,
then
Zz2
P ( z1 < Z ≤ z2 ) = f (z) dz
z1
= F ( z2 ) − F ( z2 )
where
Zz
F (z) = f (z) dz = P( Z ≤ z)
−∞
Example 36 Find the area under the normal curve in each of the cases
6 NORMAL DISTRIBUTION 24
Mr. S.S. Salgare
Solution:
a) Area between z = 0 and z = 1.2 = P(0 < Z < 1.2) = 0.3849
b) Here
c) Here
Required area = P(0 < Z < 0.46) + P(0 < Z < 2.21)
= 0.4865 + 0.1772
= 0.6637
6 NORMAL DISTRIBUTION 25
Mr. S.S. Salgare
d) Here
Required area = P(0 < Z < 1.94) − P(0 < Z < 0.81)
= 0.4738 − 0.2910
= 0.1828
e) Here
f) Here
Example 37 A sample of 100 dry battery cells tested to find the length of life
produced the following results
x̄ = 12 hours, σ = 3 hours
6 NORMAL DISTRIBUTION 26
Mr. S.S. Salgare
Assuming the dta to be normally distributed, what percentage of battery cells are
expected to have life (i) more than 15 hours (ii) less than 6 hours (iii)between 10 to
14 hours
6 NORMAL DISTRIBUTION 27
Mr. S.S. Salgare
iii) When x = 10; z = −2/3 = −0.67 and when x = 14; z = 2/3 = 0.67
Example 38 In a normal distribution, 31% of the items are under 45 and 8% are
over 64. Find the mean and standard deviation of the distribution.
6 NORMAL DISTRIBUTION 28
Mr. S.S. Salgare
∴ z2 = 1.4
x − x̄
Since z =
σ
45 − x̄ 64 − x̄
⇒ −0.5 = and 1.4 =
σ σ
45 − x̄ = −0.5σ (2)
64 − x̄ = 1.4σ (3)
x̄ = 50, σ = 10
Example 39 The life of army shoes is normally distributed with mean 8 months
and standard deviation 2 months. If 5000 pairs are issued how many pairs would
be expected to need replacement after 12 months?
Solution: Mean x̄ = 8
S.D¿ σ = 2
Number of pairs of shoes = 5000
x − x̄ 12 − 8
Total months ( x ) = 12 AS z = = =2
σ 2
6 NORMAL DISTRIBUTION 29
Mr. S.S. Salgare
Number of pairs whose life is more than 12 months(z > 2) = 5000 × 0.0228
= 114
6 NORMAL DISTRIBUTION 30
Mr. S.S. Salgare
6 NORMAL DISTRIBUTION 31
Mr. S.S. Salgare
7 Assignment No. 4
1) A random variable x has the following probability distribution
x -2 -1 0 1 2 3
P( x ) 0.1 k 0.2 2k 0.3 k
1 −|x|
f (x) = e −∞ < x < ∞
2
4) A fair coin is tossed 10 times. Find the probability that the coin shows
head (i) exactly 2 times (ii) at most 2 times (iii)at least 8 times
5) Assume that on the average one telephone out of fifteen called between
2 pm to 3 pm on week days is busy. What is the probability that if 6
randomly selected telephone numbers are called not more than 3 and at
least 3 of them will be busy.
2
6) Suppose that x has a Poisson distribution, if P( x = 2) = P ( x = 1).
3
find (i) P(x=0), (ii) P(x=3)
x 0 1 2 3 4 Total
f 109 65 22 3 1 200
7 ASSIGNMENT NO. 4 32
Mr. S.S. Salgare
8 M.C.Q.
1) Experiment: Flip a coin three times; X = the total number of heads.
A) 1, 2, 3, 4, · · · C) 1, 2, 3
B) 0, 1, 2, 3 D) 0.5, 1, 1.5, 0.2
2) Experiment: Throw two dice; X = the sum of the numbers facing up.
A) 1, 2, 3, · · · , 12 C) 2, 4, 6, 8, 12
B) 0, 1, 2, 3, · · · , 12 D) 2, 3, · · · , 12
3) Experiment: Throw one die over and over until you get a six; X = the
number of throws
A) 1, 2, 3, · · · C) 1, 2, 3, · · · , 12
B) 0, 1, 2, 3, · · · , 12 D) 0, 1, 2, 3, · · ·
4) Throw two dice over and over until you roll a double six; X = the num-
ber of throws.
A) Finite C) Continuous
B) Discrete Infinite D) None
A) Finite C) Continuous
B) Discrete Infinite D) None
A) Finite C) Continuous
B) Discrete Infinite D) None
8 M.C.Q. 33
Mr. S.S. Salgare
A) m2 C) m
√ √
B) m D) pq
A) 0 C) 4
B) −1 D) 2
13) The area under the standard normal curve which lies between z = 0.90
and z = −1.85 is
A) 0.7837 C) 1.3787
B) 0.3787 D) 0.0259
8 M.C.Q. 34
Mr. S.S. Salgare
A) 0.5 B) 2 C) 1 D) 0
A) 1 B) 2 C) 3 D) 4
23) The inequality between mean and variance of Poisson Distribution which
is true is
A) 2 B) 3 C) 4 D) 1
8 M.C.Q. 35
Mr. S.S. Salgare
Solution
Solution to M.C.Q.
8 M.C.Q. 36