Sei sulla pagina 1di 41

Centre for Computer Technology

ICT114 Mathematics for Computing


Week : 4

Probability Distributions

Objectives
Review

Week 3 Random Variables Discrete Probability Distribution Continuous Probability Distribution Binomial Distribution Normal Distribution Poisson Distribution
March 20, 2012

Generalized Multiplication Rule


If an operation can be performed in n1 ways, and if for each of these a second operation can be performed in n2 ways, and for each of the first two a third operation can be performed in n3 ways, and so forth, then the sequence of k operations can be performed in n1.n2.n3nk ways.
March 20, 2012

Permutations
The number of permutations for n distinct objects taken r at a time n.(n-1).(n-2)(n-r+1) The above product is represented by n pr = n! / (n-r)!

March 20, 2012

Combinations
The number of combinations of n distinct objects taken r at a time is n! n cr = -------------r! (n-r)!

March 20, 2012

Addition Theorem of Probability


If A and B are any two events, then P(AUB)=P(A)+P(B)-P(A B)

March 20, 2012

Conditional Probability
The

probability of an event B occurring, when an event A has already occurred is called conditional probability, represented by P(B/A). The conditional probability of B, given A, denoted by P(B/A), is defined by P(A B) P(B/A) = ---------------if P(A)>0 P(A)
March 20, 2012

Centre for Computer Technology

Probability Distributions

Random Variables Again


In

some experiments we cannot control certain variables that affect the outcome, even though most of the conditions are the same. Such experiments are called random experiments.

Set

of all possible outcomes is called a sample space or sample.

March 20, 2012

Random Variables Again


Let

a number be assigned to all the elements of a random sample space. Then there is a function defined on the sample space. This function is called a random function or a stochastic function, denoted by a capital letter X or Y.
March 20, 2012

Random Variables
A

random variable generally has some specified physical, geometrical or other function. Random variable with a finite number of values is called a discrete random variable. Random variable with an infinite number of values is called a nondiscrete random variable.
March 20, 2012

Discrete Probability Distribution


Let X = discrete random variable x1,x2,x3,... = possible values (arranged) The probability is given by P(X=xk) = f(xk) k = 1, 2, 3,. The probability function or distribution in the Simplified form is P(X=x) = f(x)
March 20, 2012

Discrete Probability Distribution


f(x) is a probability function if
1.

f(x) 0 f(x) = 1
x

2.

sum is taken over all possible values of x


March 20, 2012

Example : Suppose a coin is tossed twice. Let X represent the number of heads that can come up. With each sample point we can associate a number for X as follows Sample Point X HH 2 HT 1 TH 1 TT 0

P(HH) = P(HT) = P(TH) = P(TT) =

March 20, 2012

Then P(X=0) = P(TT) = P(X=1) = P(HTUTH) = P(X=2) = P(HH) = Thus the probability function is given by x f(x) 0 1/4 1 1/2 2 1/4

March 20, 2012

Distribution function for a Discrete Random Variable


The distribution function for X can be obtained from the probability function for all x in (-, ), 0 -<x<x1 f(x1) F(x) = f(x1)+f(x2) . . f(x1)+.+f(xn)
March 20, 2012

x1<x<x2 x2<x<x3

xnx<

Example : In the previous example 0 1 -<x<0 0<x<1 1<x<2 2x<

F(x) =

March 20, 2012

Continuous Random Variables


The function f(x) has the properties 1. f(x) 0

2. f(x)dx = 1
-

March 20, 2012

Preliminaries : Binomial theorem


The Binomial theorem gives, ( x + y ) n = x n + n C 1 x n-1y + n C 2 x n-2 y2 + + n C n-2 x 2 yn-2 + n C n-1 x yn-1 + y n
March 20, 2012

= n C r x n-r yr , r ranges from 0 to n

Binomial Distribution
Consider

an experiment, like tossing a coin or choosing a marble from an urn repeatedly. Each toss or selection is called a trial In some cases the probability will not change from one trial to another, like tossing a coin or die. Such experiments are called independent or Bernoulli trials.
March 20, 2012

Binomial Distribution
let p = probability that an event will happen q = 1-p probability that the event will fail The probability that the event will happen exactly x times in n trials

f(x) = P(X=x) = nCx px q(n-x)


March 20, 2012

Lets do this together


What is the probability of getting exactly 2 heads in 6 tosses of a fair coin? p=? q=? P(X=x) = ?

March 20, 2012

Let getting a head be the probability of success, p = Then the probability of failure, q = Number of trials, n = 6 Number of favorable outcomes, x = 2 Therefore, P(X=2) = 6C2 p2 q(6-2) = 6C2 ()2 ()4
March 20, 2012

Properties of a Binomial Distribution


Mean, = np Variance, 2 = np(1-p) = npq Standard Deviation, = (npq)

March 20, 2012

Lets do this together


Toss a fair coin 100 times, and count the number of heads that appear. Find the mean, variance and standard deviation of this experiment.

March 20, 2012

Normal Distribution
Normal

distribution is a continuous distribution. The variable may take any value between minus infinity and plus infinity. Most of the probabilities are concentrated within three standard deviations from the mean.
March 20, 2012

Normal Distribution
A

normal distribution is symmetric about mean. There are a large number of normal distributions, but the normal distribution with mean, = 0 and standard deviation, = 1 (called standard normal distribution, denoted as z ) is of interest. The probability values for this are extensively tabulated, called the z table.
March 20, 2012

Normal Distribution
Any variable X following normal distribution with mean and standard deviation can be linearly transformed to the standard normal distribution by subtracting mean and dividing by standard deviation. Z be the standard variable corresponding to X X Z = --------------
March 20, 2012

Prob (z is between 0 and 1.0) = 0.3413 We may write this as Prob (0<z<1.0). Since, this is a continuous distribution, this is the same as Prob (0 z 1.0) Similarly, Prob (0 z 2.78) = 0.4973
March 20, 2012

Lets do this together


Exercise : Marks of an examination follows normal distribution with mean 70 and standard deviation 10. What percentage of students obtained marks (i) between 70 and 85 (ii) between 80 and 90 (iii) more than 75 (iv) less than 60 (v) between 65 and 80?

March 20, 2012

Mean = 70 Standard Deviation = 10 Prob(70 X 85) = Prob ([70-70]/10 z [85-70]/10) = Prob (0 z 1.5) = 0.4332
March 20, 2012

Prob(65 X 80) = Prob ([65-70]/10 z [80-70]/10) = Prob ( - 0.5 z 1.0) = Prob ( - 0.5 z 0 )+ Prob ( 0 z 1.0) = Prob ( 0 z 0.5 ) + Prob ( 0 z 1.0) = 0.1915 + 0.3413 = 0.5328

March 20, 2012

Normal approximation to Binomial


If

n is large and if p is not too close to either 0 or 1, the binomial distribution can be approximated by a normal distribution using standardized variable. Suppose X follow binomial distribution (n,p) [ that is with mean np and variance np(1-p)]
March 20, 2012

Normal approximation to Binomial


(X np) Z = --------------- (np(1-p)) will approximately follow standard normal distribution
March 20, 2012

Lets do this together


A fair coin is tossed 400 times. What is the probability that the number of heads will be more than 215?

March 20, 2012

Poisson Distribution
The probability distribution of the Poisson random variable X, in a given time interval is given by e-t (t)x P(x:t) = ------------------- x= 0, 1, 2,. x! where is the average number of outcomes per unit time
March 20, 2012

Lets do this together


If the probability that an individual will suffer a bad reaction from an injection of a given serum is 0.001, determine the probability that out of 200 individuals (a) exactly 3 (b) more than 2 individuals will suffer a bad reaction
March 20, 2012

Given, t = 0.001 e-0.001 (0.001)3 (a) P(3:0.001) = ----------------------3! (b) P(x>2) = 1 (P(x=0)+P(x=1)+P(x=2))

March 20, 2012

Summary

Discrete Probability Distribution


1. f(x) 0 2. f(x) = 1
x

Continuous Probability Distribution


1. f(x) 0

2. f(x)dx = 1
-

March 20, 2012

Summary
Binomial

Distribution, f(x) = P(X=x) = nCx px q(n-x)

p = probability of success, q = 1-p = probability of failure

X Normal Distribution, Z = -------------- e-t (t)x Poisson distribution, P(x:t) = ----------------x!


is the average outcomes per unit time
March 20, 2012

Reference
Spiegel,

Schiller, Srinivasan : Probability and Statistics M R Spiegel : Theory and Problems of Statistics, Schaum's Outline Series, McGraw Hill http://mathworld.wolfram.com

March 20, 2012

Potrebbero piacerti anche