0% found this document useful (0 votes)
9 views10 pages

Computer Numerical and Statistical Method Unit 3 Calicut Univercitty Note

complete computer numerical and statistical method unit 3 calicut univercitty note for sem 2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views10 pages

Computer Numerical and Statistical Method Unit 3 Calicut Univercitty Note

complete computer numerical and statistical method unit 3 calicut univercitty note for sem 2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Unit 3

Probability distribution
Suppose x is a random variable assuming values x1, x2, …, xn with corresponding probabilities p1, p2,
…, pn

Then probability distribution is

X p(x)
X1 p1
X2 p2
Xn pn
The probability distribution has the following properties

P(x)≥0

Σ ( p ( x ) ) =1

e.g., let x stands for number of heads obtained when 3 coins are tossed

3
x takes values 0, 1, 2, and 3 with corresponding probabilities 1 8 , 1
,
8 8
so, the probability distribution of x is

x$p(x)

1
0$
8
3
1$
8
3
2$
8
1
3$
8
All p(x) ≥0 and Σ ( p ( x ) ) =1

Therefore, the distribution is probability distribution

Q: examine whether the following distribution is probability distribution

X,-1,0,1,2,3

P(x),0.01,0.1,0.5,0.3,0.09

Here, all p(x) ≥0 and Σ(p(x))=1. Therefore, the distribution is probability distribution

Expectation of x

If x is a random variable assuming values x1,x2,…,xn with corresponding probabilities p1,p2,…,pn


Then expectation of x is defined as

expectation ( x )=Σ ¿
expectation of x is the mean value of x

variants of x

if x is a random variable assuming values x1,x2,…,xn with corresponding probabilities p1,p2,…,pn

then variants of x are defined as

v ( x )=Σ ( x 2 p ( x )−e ( x )2 )

Q: Find mean and variants of x from the following probability distribution:

1
f ( 0 )=
8
3
f ( 1) =
8
3
f ( 2 )=
8
1
f ( 3 )=
8
X 0 1 2 3
P(x) 1 3 3 1
8 8 8 8
x p(x) 0 3 6 3
8 8 8
x
2
0 1 4 9
2
x p(x ) 0 3 12 9
8 8 8
Q: let f (x)=0.2 when x=1 f(x)=0.3 when x=2 f(x)=0.5 when x = 3. Find e (x) and v (x)

E(x)=2.3

V(x)=0.63

Discrete and continues probability distribution

A random variable is said to be discrete if it assumes only specified values in a given interval

e.g., in tossing 2 coins, the number of heads obtainable can be 0, 1, and 2

therefore, the variable takes the values 0, 1, and 2. This is a discrete variable and the probability
distribution of a discrete variable is a discrete probability distribution

e.g., binomial distribution, poison distribution

if a random variable is assuming any real value in a given interval (a, b) then the variable is said to be
continues

the probability distribution of a continues variable is a continues probability distribution


e.g., normal distribution.

Q: evaluate k if the following function is probability distribution, also find p(1≤x≤3)

X 0 1 2 3
P(x) 1/6 ½ k/10 1/30
Given the distribution is probability distribution, so we know that Σ p (x) = 1

i.e., 1/6, ½, k/10, 1/30 = 1

7 k
+ =1
10 10
k 7
=1−
10 10
k 3
=
10 10
10 k =30
30
k=
10
k =3
Therefore, the distribution becomes

X 0 1 2 3
P(x) 1/6 ½ 3/10 1/30
p(1≤x≤3)=1/2+3/10+1/30=5/6

Q: evaluate k if the following function is a probability distribution. Also find p(x≤2) p (0<x<3)

F(0)=k/2

F(1)=k/5

F(2)=k/20

F(3)=k/4

F(x)= 0 else where

X 0 1 2 3

P(x) k/2 k/5 k/20 k/4

Given distribution is probability distribution. Therefore, Σ p (x) = 1

k/2+k/5+k/20+k/4=1

k (1/2+1/5+1/20+1/4) =1

k ×1=1
k =1
Therefore, the distribution becomes
X 0 1 2 3

P(x) 1/2 1/5 1/20 1/4

p(x≤2)= 1/2+1/5+1/20=3/4

p (0<x<3)= (1/5)+(1/20)=1/4

Probability mass function

Let x be a discrete random variable assuming the values x1,x2,…,xn with corresponding probabilities
f(x1),f(x2),…,f(xn)

Then, p(x)=xi=f(xi)

I=1,2,…,n

The function f(x) is called a probability mass function provided satisfied conditions:

F(xi)≥0

Σ f(x) = 1

Probability density function

Let x be a continues random variable. Let the possible range of values of x be (a, b) i.e., x lies
between a and b

Consider a small interval with in (a, b) say (x,x+dx)

Let probability for x lying between x and x+dx is p (x)<x+dx is denoted by f(x, dx) then f(x) is called
the density function of x

Properties of probability density function

F(x)≥0
b

∫ f ( x ) dx=1
a

Where, (a, b) is the range of values of x


c b b

∫ f ( x ) dx +∫ f ( x ) dx=∫ f ( x ) dx
a c a

Q: Show that f(x)=e^(-x), x≥0 is a probability density function

Let f(x)=e^(-x)

F(x)=1/e^x

Therefore f(x)≥0 is satisfied

Now we have to prove that


b

∫ f ( x ) dx=1
a
( )
∞ −x ∞
e
∫ e dx= −1
−x

0 0

−x ∞
¿ ( (−e ) 0)

( )

−1
¿ x
e 0

¿
( −1e )−( −1e )
∞ 0

−1 1
¿ +
∞ 1
¿ 0+1=1
Q: for 0≤x≤1. Find k.

Given distribution is probability distribution function


b
So we know that ∫ f ( x ) dx=1
a

Q: examine whether f (x) as defined below is probability density function

F(x)=0,x<2,1/18,3+2x,2≤x≤4

0,x>4
b
We have to prove that ∫ f (xdx )=1
a

∫ f ( xdx )=¿
a

Q: examine whether f(x) is a density function if f(x)=2x, 0≤x≤1

Here, f(x)≥0 is satisfied


b
We have to prove that ∫ f (xdx )=1
a

Q: find the value of k if f(x)=kx for 0<x<1


b
We know that ∫ f ( x ) dx=1
a

Binomial distribution

A random variable x is said to follow binomial distribution with parameters n and p if its probability
function is
x n− x
f ( x )=n c x p q
Where, x = 0,1,2,…,n

P lies between 0 and 1

P+q=1

Q=1-p

N stands for number of trials

Properties of binomial distribution

Binomial distribution is a discrete probability distribution

Binomial distribution has 1 or 2 modle values

Mean of the binomial distribution increases as n increases with p remaining constant

Binomial distribution has mean=np and sd=√(npq) v=npq

If 2 independent random variable follow binomial distribution they’re sum also follows binomial
distribution

Q: 4 coins are tossed simultaneously what is the probability of getting 2 heads


x n−x
F(x)=n c x p q

N=number of coins tossed=4

P=p(getting head in a single trial)=1/2

Q=1-(1/2)

X=number of heads to be determined = 2

( )( )
2 2
1 1
P (getting 2 heads)=4 C2 =¿
2 2
Fitting a binomial distribution

Q: 8 coins tossed together 256 times

Find the expected frequencies of head and find mean and sd

n=8

N=256

p=1/2

q=1-(1/2)
x ( n−x )
f(x)=n c x p q

mean=np

sd=√(npq)

v=npq
putting x=0,1,2,3,4,5,6,7,8 we get all the terms of binomial distribution

| x | f(x) | N * f(x) |

|----|--------------------|-----------|

| 0 | 1/256 |1 |

| 1 | 1/32 |8 |

| 2 | 7/64 | 28 |

| 3 | 7/32 | 56 |

| 4 | 35/128 | 70 |

| 5 | 7/32 | 56 |

| 6 | 7/64 | 28 |

| 7 | 1/32 |8 |

| 8 | 1/256 |1 |

Q: fit a binomial distribtuion for the following data

X,0,1,2,3,4,5

F,6,20,28,12,8,6

Fx,0,20,56,36,64,30

σ(fx)=

i.e., np = mean

here, n=5

calculate as normal

poison distribution

a discrete random variable (x) is said to follow poison distribution if its probability density function is
−m x
e m
p(x)=
x!
for x assuming values 0,1,2,…,∞

m is the parameter of the poison distribution. It is the mean of the poison distribution.

Characteristics of poison distribution

Poison distribution is a discrete probability distribution

If x follows a poison distribution, then x takes the values 0,1,2,…,∞

Poison distribution has a single parameter m

Mean=m, sd = √(m), v=m


For a poison distribution, mean = v

Poison distribution is a positively skewed distributionx

Fitting a poison distribution

Q: fit a poison distribution to the following data

X,0,1,2,3,4

F,123,59,14,3,1

Fx,0,59,28,9,4

σ(fx)= 100

N=200

Σ ( fx )
m= =0.5
N

−m x
e m
p(x)=
x!
−0.5 x
e 0.5
=
x!
Q: fit a poison distribution for the following data

X,0,1,2,3,4,5,6

F,48,27,12,7,4,1,1

Normal distribution

A continues random variable x is said to follow normal distribution if its probability function is f(x)=
1
( )
2
−1 x−μ
×
√2 π σ ×e 2 σ

Where, μ and σ are constants (mu=mean, Σ = sd)

The variable x varies between -∞ to +∞

Normal distribution is a continues curve

The normal curved bell shaped

It is symmetrical about the mean

Mean, median, and mod is equal for a normal distribution

The Hight of normal curve is at its maximum at the mean

Normal distribution is mesokurtic

No possion of the curve exist below the x axis


Coeffient of skewness is 0

Fitting normal distribution

Q: fit a normal distribution to the following data

Marks,10-20,20-30,30-40,40-50,50-,60,60-70,70-80

F,4,22,48,66,40,16,4

X,15,25,35,45,55,65,75

Fx,60,550,1680,2970,2200,1040,100

X^2,225,625,1225,2025,3025,4725,5625

Fx^2,900,13750,58700,133650,121000,67600,22500

N=200

σ (fx)= 8800

σ(fx^2)= 418200

Σ ( fx )
mean=
N
8800
¿
200
¿ 44


Σ ( f x ) ∑ ( fx )
2 2
sd= −
N N

¿
√ 418200 8800 2
200

200

¿
√ 418200 8800 2
200

200
¿ √ 155
¿ 12.5
1
f ( x )=
( )
2
−1 x− μ
×
√2 π σ × e 2 σ

1
¿
( )
2
−1 x−44
×
√2 π 12.5 × e 2 12.5

Class 10 20 30 40 50 60 70 80
limit (x)
x−μ -2.72 -1.92 -1.12 -0.32 0.48 1.28 2.08 2.88
σ
Aria .5 .4726 .3686 .1255 .1844 .3997 .4812 .5
from
table
Aria
from
™interval

You might also like