- 111 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about 'CS433: Modeling and Simulation' - michiko-hanabishi

Download Now**An Image/Link below is provided (as is) to download presentation**
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

Download Now

Presentation Transcript

### CS433: Modeling and Simulation

Al-Imam Mohammad bin Saud University

Lecture 04: Statistical Models

Dr. Anis Koubâa

09 October 2010

Goals for Today

- Review of the most common statistical models
- Understand how to determine the empirical distribution from a statistical sample

Discrete versus Continuous Random Variables

Discrete Random Variable

Continuous Random Variable

Finite Sample Space

e.g. {0, 1, 2, 3}

Infinite Sample Space

e.g. [0,1], [2.1, 5.3]

Probability Mass Function (PMF)

Probability Density Function (PDF)

Cumulative Distribution Function (CDF)

Discrete Probability Distributions

Bernoulli Trials

Binomial Distribution

Geometric Distribution

Poisson Distribution

Poisson Process

Bernoulli Trials

- Context: Random events with two possible values
- Two events: Yes/No, True/False, Success/Failure
- Two possible values: 1 for success, 0 for failure.
- Example: Tossing a coin, Packet Transmission Status,
- An experiment comprises n trial.
- Probability Mass Function (PMF): Probability in one trial
- Bernoulli Process: n trials

Binomial Distribution

- Context: Number of successes in a series of n trials.
- Example: the number of 'heads' occurring when a coin is tossed 50 times.
- The number of successful transmissions of 100 packets
- Probability Mass Function (PMF)
- Binomial distribution with parameters n and p, X ~ B(n,p)

Probability of having k successes in n trial

- where
- k = 0, 1, 2, ......., n k: number of success
- n = 1, 2, 3, ....... n: number of trials
- 0 < p < 1 p = success probability

with

Binomial Distribution

Probability of k=2 successes in n=3 trials?

E1: 1 1 0

P(E1)= p(1 and 1 and 0) = p p (1-p) = p2 (1-p)

or

E2: 1 0 1

P(E2)= p(1 and 0 and 1) = p (1-p) p = p2 (1-p)

or

P(E3)= p(1 and 1 and 0) = p p (1-p) = p2 (1-p)

E3: 0 1 1

Probability of k=2 successes in n=3 trials?

Modeling of Discrete Random Time

Geometric Distribution

Context: the number of Bernoulli trials until achieving the FIRST SUCCESS.

It is used to represent random time until a first transition occurs.

Geometric DistributionPMF

k

Poisson Distribution

- Context: number of events occurring in a fixed period of time
- Events occur with a known average rate and are independent
- Possion distribution is characterized by the average rate
- The averagenumber of arrival in the fixed time period.
- Examples
- The number of cars passing a fixed point in a 5 minute interval. Average rate: = 3 cars/5 minutes
- The number of calls received by a switchboard during a given period of time. Average rate: =3 call/minutes
- The number of message coming to a router per second
- The number of travelers arriving to the airport for flight registration

Poisson Distribution

- The Poisson distribution with the average rate parameter l

the probability that there are exactlyk arrivals in a certain period of time.

the probability that there are at least k arrivals in a certain period of time.

PMF

CDF

Example: Poisson Distribution

- The number of cars that enter the parking follows a Poisson distribution with a mean rate equal to l = 20 cars/hour
- The probability of having exactly15 cars entering the parking in one hour:

or

- The probability of having more than 3 cars entering the parking in one hour:

USE EXCEL/MATLAB

FOR COMPUTATIONS

Example: Poisson Distribution

Probability Mass Function

Poisson (l = 20 cars/hour)

Cumulative Distribution Function

Poisson (l = 20 cars/hour)

Five Minutes Break

You are free to discuss with your classmates about the previous slides, or to refresh a bit, or to ask questions.

Administrative issues

Groups Formation

Poisson Process

- Process N(t)
- random variable N that depends on time t
- Poisson Process: a Process that has a Poisson Distribution
- N(t)is called a counting poisson process
- There are two types:
- Homogenous Poisson Process: constant average rate
- Non-Homogenous Poissoon Process: variable average rate

What is “Stochastic Process”?

State Space = {SUNNY,

RAINNY}

Day

Day 4

Day 7

Day 5

Day 3

Day 2

Day 6

Day 1

SUN

WED

MON

SAT

FRI

TUE

THU

X(dayi): Status of the weather observed each DAY

Examples of using Poisson Process

- The number of web page requests arriving at a server may be characterized by a Poisson process except for unusual circumstances such as coordinated denial of service attacks.
- The number of telephone calls arriving at a switchboard, or at an automatic phone-switching system, may be characterized by a Poisson process.
- The arrival of "customers" is commonly modelled as a Poisson process in the study of simple queueing systems.
- The execution of trades on a stock exchange, as viewed on a tick by tick basis, is a Poisson process.

(Homogenous) Poisson Process

- Formally, a counting process is a (homogenous) Poisson process with constant average rate l if:
- describes the number of events in time interval
- The mean and the variance are equal

t

t+t

t+t+q

(Homogenous) Poisson Process

- Properties of Poisson process
- Arrivals occur one at a time (not simultaneous)
- has stationary increments, which means

The number of arrivals in time s to t is also Poisson-distributed with mean

- has independent increments

Inter-Arrival Times of a Poisson Process

CDF of Exponential distribution

- Inter-arrival time: time between two consecutive arrivals
- The inter-arrival times of a Poisson process are random. What is its distribution?
- Consider the inter-arrival times of a Poisson process (A1, A2, …), where Ai is the elapsed time between arrival i and arrival i+1
- The first arrival occurs after time tMEANS that there are no arrivals in the interval [0,t], As a consequence:

The Inter-arrival times of a Poisson process are exponentially distributed and independent with mean 1/l

lp

l

N(t) ~ Poi(l)

N2(t) ~ Poi[l(1-p)]

l(1-p)

l1

N1(t) ~ Poi[l1]

l1 + l2

N(t) ~ Poi(l1 + l2)

N2(t) ~ Poi[l2]

l2

Splitting and Pooling- Splitting
- Pooling

Non Homogenous (Non-stationary) Poisson Process (NSPP)

- The non homogeneous Poisson process is characterized by a VARIABLErate parameter λ(t), the arrival rate at time t. In general, the rate parameter may change over time.
- The stationary increments, property is not satisfied
- The expected number of events (e.g. arrival) between timesand time t is

l1

l2

l3

Example: Non-stationary Poisson Process (NSPP)

- The number of cars that cross the intersection of King Fahd Road and Al-Ourouba Road is distributed according to a non homogenous Poisson process with a mean l(t) defined as follows:
- Let us consider the time 8 am as t=0.
- Q1. Compute the average arrival number of cars at 11H30?
- Q2. Determine the equation that gives the probability of having only 10000 car arrivals between 12 pm and 16 pm.
- Q3. What is the distribution and the average (in seconds) of the inter-arrival time of two cars between 8 am and 9 am?

Example: Non-stationary Poisson Process (NSPP)

- Q1. Compute the average arrival number of cars at 11H30?
- Q2. Determine the equation that gives the probability of having only 10000 car arrivals between 12 pm and 16 pm.

We know that the number of cars between 12 pm and 16 pm, i.e. follows a Poisson distribution. During 12 pm and 16pm, the average number of cars is

Thus,

- Q3. What is the distribution and the average (in seconds) of the inter-arrival time of two cars between 8 am and 9 am? (Homework)

Two Minutes Break

You are free to discuss with your classmates about the previous slides, or to refresh a bit, or to ask questions.

Administrative issues

Groups Formation

Continuous Probability Distributions

Uniform Distribution

Exponential Distribution

Normal (Gaussian) Distribution

Continuous Uniform Distribution

- The continuous uniform distribution is a family of probability distributions such that for each member of the family, all intervals of the same length on the distribution's support are equally probable
- A random variable X is uniformly distributed on the interval [a,b], U(a,b), if its PDF and CDF are:

Uniform Distribution PDF

- Properties
- is proportional to the length of the interval
- Special case: a standard uniform distribution U(0,1).
- Very useful for random number generators in simulators

CDF

Exponential Distribution

Modeling Random Time

Exponential Distribution

- The exponential distribution describes the times between events in a Poisson process, in which events occur continuously and independently at a constant average rate.
- A random variable X is exponentially distributed with parameter m=1/l> 0 if its PDF and CDF are:

Exponential Distribution

- The memoryless property: In probability theory, memoryless is a property of certain probability distributions: the exponential distributions and the geometric distributions, wherein any derived probability from a set of random samples is distinct and has no information (i.e. "memory") of earlier samples.
- Formally, the memoryless property is:

For all s and t greater or equal to 0:

- This means that the future event do not depend on the past event, but only on the present event
- The fact that Pr(X > 40 | X > 30) = Pr(X > 10) does not mean that the events X > 40 and X > 30 are independent; i.e. it does not mean that Pr(X > 40 | X > 30) = Pr(X > 40).

Exponential Distribution

- The memoryless property: can be read as “the probability that you will wait more than s+t minutes given that you have already been waiting s minutes is equal to the probability that you will wait t minutes.”
- In other words “The probability that you will wait s more minutes given that you have already been waiting t minutes is the same as the probability that you had wait for more than s minutes from the beginning.”
- The fact that Pr(X > 40 | X > 30) = Pr(X > 10) does not mean that the events X > 40 and X > 30 are independent; i.e. it does not mean that Pr(X > 40 | X > 30) = Pr(X > 40).

Example: Exponential Distribution

- The time needed to repair the engine of a car is exponentially distributed with a mean time equal to 3 hours.
- The probability that the car spends more than 3 hours in reparation
- The probability that the car repair time lasts between 2 to 3 hours is:
- The probability that the repair time lasts for another hour given it has been operating for 2.5 hours:

Using the memoryless property of the exponential distribution, we have:

Normal Distribution

- The Normal distribution, also called the Gaussian distribution, is an important family of continuous probability distributions, applicable in many fields.
- Each member of the family may be defined by two parameters, location and scale: the mean ("average", μ) and variance (standard deviation squared, σ2) respectively.
- The importance of the normal distribution as a model of quantitative phenomena in the natural and behavioral sciences is due in part to the Central Limit Theorem.
- It is usually used to model system error (e.g. channel error), the distribution of natural phenomena, height, weight, etc.

Normal or Gaussian Distribution

- A continuous random variable X, taking all real values in the range (-∞,+∞) is said to follow a Normal distribution with parameters µ andσ if it has the following PDF and CDF:

where

- The Normal distribution is denoted as
- This probability density function (PDF) is
- a symmetrical, bell-shaped curve,
- centered at its expected value µ.
- The variance is s2.

Normal distribution

- Example
- The simplest case of the normal distribution, known as the Standard Normal Distribution, has expected value zero and variance one. This is written as N(0,1).

Normal Distribution

- Evaluating the distribution:
- Independent of m and s, using the standard normal distribution:
- Transformation of variables: let

Normal Distribution

- Example: The time required to load an oceangoing vessel, X, is distributed as N(12,4)
- The probability that the vessel is loaded in less than 10 hours:
- Using the symmetry property, F(1) is the complement of F (-1)

Empirical Distributions

- An Empirical Distribution is a distribution whose parameters are the observed values in a sample of data.
- May be used when it is impossible or unnecessary to establish that a random variable has any particular parametric distribution.
- Advantage: no assumption beyond the observed values in the sample.
- Disadvantage: sample might not cover the entire range of possible values.

Empirical Distributions

- In statistics, an empirical distribution function is a cumulative probability distribution functionthat concentrates probability 1/n at each of the n numbers in a sample.
- Let X1, X2, …, Xn be iid random variables in with the CDF equal to F(x).
- The empirical distribution function Fn(x) based on sample X1, X2, …, Xn is a step function defined by

where I(A) is the indicator of event A.

- For a fixed value x, I(Xi≤x) is a Bernoulli random variable with parameter p=F(x), hence nFn(x) is a binomial random variable with mean nF(x)and variance nF(x)(1-F(x)).

Download Presentation

Connecting to Server..