Sie sind auf Seite 1von 16

Math801MathematicalMethodsforComputing

RandomVariables& DiscreteProbability yDistribution


Dr.SohailIqbal

Outline
ConceptofRandomVariable ExamplesofRandomVariableProblems DiscreteProbabilityDistribution TheBinomialDistribution Examples HomeWork

Conceptof RandomVariable
Inmostprobabilityproblems,weare interestedinonenumberthatisassociated withtheoutcomeofexperiment.Such number beingrandomduetorandom number, outcomeofexperiment,iscalledRandom Variable.

Examplesof RandomVariableProblems
1. Inmanufacturing,x =No.ofdefectiveitems 2. InRoadTesting,y =Averagevehicles vehicles speed 3. Throwingtwodice,z =sumoftwodice Allthesenumbersareassociatedwith situationsinvolvingrandomness,therefore, all llof fthe th above b variable i bl x,y,and dzareth three differentrandomvariables.
4

ProbabilityDistribution
StudyingRandomVariablesweinterestin: Probabilitieswithwhichtheytakethevarious valuesintheirrange. Thi spread This dof fprobabilities b bili i for f the h various i valuesofrandomvariablesiscalleda probabilitydistribution. Inthefollowing,weconstructanexample:
5

Experimentof ThrowingtwoDice

Results:

Tabulated:
Thinkabouthavinga sumoftwodice dice=z=7 7 P(X=7)=6/36

Example1
Probability b b l d distribution b function f (pdf) ( df)f forthe h sum oftwodice

Note:Abovediagramisexperimental,makeyourselfidealpdf.

Example2
Note:Probability distribution functionisalso calledprobability densityfunction orprobability massfunction.
8

DiscreteProbabilityDistribution
Whentherandomvariabletakesthediscrete probability ydistributionwillbe values,itsp DiscreteProbabilityDistribution. Forexample example, throwingtwodice ornumberof defectiveitemsineachshipment willhave discreteprobability b b l distributions. b

PatternUnderstanding
Byunderstandingtheunderlyingpattern p wehaveformulated behindeachexperiment, differentprobabilitydistribution. Inthefollowing, following weshallstudythemost importantdiscreteprobabilitydistribution called ll The h Binomial lProbability b b l Distribution. b

10

BinomialProbabilityDistribution
Considerexperimentoftossingacoin: 1. Outcomecanbeclassifiedassuccess/failure 2. Successprobability,p,remainssame 3. Thesuccessivetrialsareallindependent Anyexperimentwheretrialsrespectabove threeconditionsarecalledBernoullitrails. Theexperimenthavingn Bernoullitrialsis calledabinomialprobabilityexperiment.
11

BinomialProbabilityDistribution
WhenX denotesthenumberofsuccessesinn probability yexperiment, p it trialsofabinomialp iscalledabinomialrandomvariablehaving BinomialProbabilityDistribution.Forsuchr.v. rv X, thebinomialp.d.isgivenbytheformula:
n p xq n -x , b(x ; n, p) = P (X = x ) = x x = 0,1,2,..., n

where q =1-p istheprobabilityoffailure


12

ClassicExample
Q:Acoinistossed5times.Whatareprobabilities gvariousnumberofheads? ofobtaining SincetheseareBernoullitrialswithn=5times. Ther.v. r v X hasabinomialprobabilitydistribution withp=1/2,q=1/2,andn=5.Thereforeweapply
n x n -x b(x ; n, p) = P (X = x ) = p q , x x =0 0,1,2,..., 12 n

13

n x n -x b(x ; n, p) = P (X = x ) = pq , x

MainformulaforBPD

x = 0,1,2,..., 012 n

x 5-x 5 1 1 1 b(x ; 5 , ) = P (X = x ) = , 2 x 2 2

x = 0,1,2, 3, 4, 5

0 5-0 5 1 1 1 1 1 b(0 (0; 5 , ) = P (X = 0) = = 11 = 2 32 32 0 2 2 3 5- 3 5 1 1 1 1 1 10 = 10 = b(3; 5 , ) = P (X = 3) = 3 2 2 2 8 4 32

14

HomeWork:Task2.1 21
MakeaMatlab programtoimplement
n x n -x b(x ; n, p) = P (X = x ) = p q , x x = 0,1,2,..., n

suchthat,foranyinputofnandp,program generateahistogram. g g

15

Questions?
ThankYou!

16

Das könnte Ihnen auch gefallen