Mathematical Model Of Various Distribution Engineering Essay


According to jerry banks et al Discrete event simulation, fifth edition, various distribution models are used to generate random variable X by using inverse transform techquine .They are as follows in subsequent sections

Uniform distribution also known as rectangular distribution is in which random Variable X is uniformly distributed between interval [a,b] where its pdf(probability density function) is given by


And cumulative density function (cdf) is given by

It should that the length of interval is proportional for all and

Thereby satisfying a≤≤≤b

P()= F() -F()=

If Inverse transform technique approach is used to sample uniform distribution, first a reasonable guess to generating random variable X is given

Here R is always Random on [0,1] so its pdf is given by


Lady using a tablet
Lady using a tablet


Essay Writers

Lady Using Tablet

Get your grade
or your money back

using our Essay Writing Service!

Essay Writing Service

Also cdf is given by so following steps are implied to obtain X is as follows

Set / = R

Then we solve X in terms of R yielding,

Which agrees with random variable X equation

Exponential Distribution has shown its importance to model interarrival times where arrivals are completely random in nature and to model highly variable model service times which occur in random fashion .Hence in these scenarios λ is the rate of arrivals per hour or services per minite.To measure the lifetime of component in system which fails catastrophically ,exponentiatial distribution is used where λ is the failure rate

Here random variable X is said to be exponentially distributed with parameter λ > 0 if its pdf is given by

λx, x≥0


And cdf is given by

Here the parameter λ can be taken as the mean number of occurrences per time unit.If interarriaval time are exponential distribution with rate λ,the λ can be considered as the mean number of arrivals per unit ,or the arrival rate .I we nnotice for any i

So is the mean interarrival time .So main goal is to dvelop a procedure for generating values that have exponential distribution.

Hence inverse transform technique can be implied at least in principle for any distribution but most useful where cdf F(x) is of form that is simple so that inverse can be computed easily .Following step show step by step procedure for inverse transform technique illustrated by exponential distribution

Step 1: Computing cdf of random variable X

F(x)= ,x≥0.

Step 2 :Set F(x)= R on the rang of X

For exponential distribution it becomes =R on the range X≥0.

X is the random variable whaich is exponentially distributed hence is also a randon variable called R which is to be uniformly distributed over interval [0,1].

Step 3: Solving the equation F(x)= R for X in terms of R

For the exponetiaonl distribution ,solution is as follows :

X= 1.1

The above equation(1.1) is know as Random Variate Generator for exponetional distribution.It can also be written as X = .To generate sequence of randon numbers next setp is followed

Step 4: Using equation = ) we genatare random numbers and compute correndonding randon varietes

For exponential case by equation 1.1 so

For i=1,2,3………..For simplifiacation

This alternative is justified by the fact both and 1- are uniformly distributed on [0,1]

Jonathan de Halleux,, 2002

A C++ program to generate Random Varites using Normal and exponetional distribution is implemented as Fast randon generator using the algorithm developed by George Marsaglia and Wai Wan Tsang in paper The Ziggurat Method for Generating Random Variables, George Marsaglia and Wai Wan Tsang, Journal of Statistical Software, Vol 05, Issue

// RandomGenerator.cpp: implementation of the CRandomGenerator //

#include "stdafx.h"

#include "HistogramDemo.h"

#include "RandomGenerator.h"

#ifdef _DEBUG

#undef THIS_FILE

static char THIS_FILE[]=__FILE__;

#define new DEBUG_NEW


unsigned long CRandomGenerator::jz;

unsigned long CRandomGenerator::jsr=123456789;

long CRandomGenerator::hz;

unsigned long CRandomGenerator::iz;

unsigned long CRandomGenerator::kn[128];

unsigned long CRandomGenerator::ke[256];

Lady using a tablet
Lady using a tablet


Writing Services

Lady Using Tablet

Always on Time

Marked to Standard

Order Now

float CRandomGenerator::wn[128];

float CRandomGenerator::fn[128];

float CRandomGenerator::we[256];

float CRandomGenerator::fe[256];

CRandomGenerator::CRandomGenerator( unsigned long jsreed )




/* nfix() generates variates from the residue when rejection in RNOR occurs. */

float CRandomGenerator::nfix(void)


const float r = 3.442620f; /* The starting of the right tail */

static float x, y;





{ /* iz==0, handle the base strip */




/* .2904764 is 1/r */


} while(y+y<x*x);

return (hz>0)? r+x : -r-x;


/* iz>0, handle the wedges of other strips */

if( fn[iz]+UNI()*(fn[iz-1]-fn[iz]) < exp(-.5*x*x) )

return x;

/* start all over */




return (hz*wn[iz]);



/* efix() generates variates from the residue when rejection in REXP occurs. */

float CRandomGenerator::efix(void)


float x;




return (7.69711-log(UNI())); /* iz==0 */


if( fe[iz]+UNI()*(fe[iz-1]-fe[iz]) < exp(-x) )

return (x);

/* Start all over again */




return (jz*we[iz]);



/*--------This procedure sets the seed and creates the tables------*/

void CRandomGenerator::zigset(unsigned long jsrseed)


const double m1 = 2147483648.0, m2 = 4294967296.;

double dn=3.442619855899,tn=dn,vn=9.91256303526217e-3, q;

double de=7.697117470131487, te=de, ve=3.949659822581572e-3;

int i;


/* Set up tables for RNOR */











kn[i+1]=(dn/tn)*m1; tn=dn;




/* Set up tables for REXP */

q = ve/exp(-de);

ke[0]=(de/q) * m2; ke[1]=0;

we[0]=q/m2; we[255]=de/m2;

fe[0]=1.; fe[255]=exp(-de);




ke[i+1]= (de/te)*m2;