simulation
play

Simulation Discrete-Event System Simulation Dr. Mesut Gne Computer - PowerPoint PPT Presentation

Computer Science, Informatik 4 Communication and Distributed Systems Simulation Discrete-Event System Simulation Dr. Mesut Gne Computer Science, Informatik 4 Communication and Distributed Systems Chapter 4 Statistical Models in


  1. Computer Science, Informatik 4 Communication and Distributed Systems Simulation “Discrete-Event System Simulation” Dr. Mesut Güne ş

  2. Computer Science, Informatik 4 Communication and Distributed Systems Chapter 4 Statistical Models in Simulation

  3. Computer Science, Informatik 4 Communication and Distributed Systems Purpose & Overview � The world the model-builder sees is probabilistic rather than deterministic. • Some statistical model might well describe the variations. � An appropriate model can be developed by sampling the phenomenon of interest: • Select a known distribution through educated guesses • Make estimate of the parameters • Test for goodness of fit � In this chapter: • Review several important probability distributions • Present some typical application of these models Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 3

  4. Computer Science, Informatik 4 Communication and Distributed Systems Review of Terminology and Concepts � In this section, we will review the following concepts: • Discrete random variables • Continuous random variables • Cumulative distribution function • Expectation Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 4

  5. Computer Science, Informatik 4 Communication and Distributed Systems Discrete Random Variables � X is a discrete random variable if the number of possible values of X is finite, or countable infinite. � Example: Consider jobs arriving at a job shop. - Let X be the number of jobs arriving each week at a job shop. R x = possible values of X (range space of X ) = {0,1,2 ,… } p(x i ) = probability the random variable X is x i , p(x i ) = P(X = x i ) • p(x i ), i = 1,2, … must satisfy: ≥ p x i 1. ( ) 0 , for all i ∑ ∞ = p x 2. ( ) 1 i = i 1 • The collection of pairs [x i , p(x i )], i = 1,2,…, is called the probability distribution of X , and p(x i ) is called the probability mass function (pmf) of X . Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 5

  6. Computer Science, Informatik 4 Communication and Distributed Systems Continuous Random Variables � X is a continuous random variable if its range space R x is an interval or a collection of intervals. The probability that X lies in the interval [a, b] is given by: � b ∫ ≤ ≤ = P a X b f x dx ( ) ( ) a f(x) is called the probability density function (pdf) of X , satisfies: � ≥ f x x R 1. ( ) 0 , for all in X ∫ = f x dx 2. ( ) 1 R X = f x x R 3. ( ) 0 , if is not in X Properties � x ∫ = = = 0 P X x f x dx 1. ( ) 0 , because ( ) 0 0 x 0 ≤ ≤ = < ≤ = ≤ < = < < P a X b P a X b P a X b P a X b 2 . ( ) ( ) ( ) ( ) Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 6

  7. Computer Science, Informatik 4 Communication and Distributed Systems Continuous Random Variables � Example: Life of an inspection device is given by X , a continuous random variable with pdf: ⎧ 1 ⎪ − ≥ x e / 2 , x 0 = f x ⎨ ( ) 2 ⎪ ⎩ 0 , otherwise Lifetime in Year • X has an exponential distribution with mean 2 years • Probability that the device’s life is between 2 and 3 years is: 1 3 ∫ − ≤ ≤ = x = P x e dx / 2 ( 2 3 ) 0 . 14 2 2 Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 7

  8. Computer Science, Informatik 4 Communication and Distributed Systems Cumulative Distribution Function � Cumulative Distribution Function (cdf) is denoted by F(x) , where F(x) = P(X ≤ x) ∑ = F x p x ( ) ( ) • If X is discrete, then i ≤ x x i x ∫ ∞ = F x f t dt ( ) ( ) • If X is continuous, then − � Properties ≤ ≤ F a b F a F b 1. is nondecreas ing function. If , then ( ) ( ) = F x 2. lim ( ) 1 → ∞ x = F x 3. lim ( ) 0 → −∞ x � All probability question about X can be answered in terms of the cdf: ≤ ≤ = − ≤ P a X b F b F a a b ( ) ( ) ( ) , for all Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 8

  9. Computer Science, Informatik 4 Communication and Distributed Systems Cumulative Distribution Function � Example: An inspection device has cdf: = ∫ 1 x − = − − t x F x e / 2 dt e / 2 ( ) 1 2 0 • The probability that the device lasts for less than 2 years: 1 = ≤ ≤ = − = = − − P X F F F e ( 0 2 ) ( 2 ) ( 0 ) ( 2 ) 1 0 . 632 • The probability that it lasts between 2 and 3 years: − − ≤ ≤ = − = − − − = P X F F e ( 3 / 2 ) e 1 ( 2 3 ) ( 3 ) ( 2 ) ( 1 ) ( 1 ) 0 . 145 Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 9

  10. Computer Science, Informatik 4 Communication and Distributed Systems Expectation � The expected value of X is denoted by E(X) ∑ = E x x p x ( ) ( ) • If X is discrete i i i all ∞ ∫ = ⋅ E x x f x dx • If X is continuous ( ) ( ) − ∞ a.k.a the mean, m, µ, or the 1 st moment of X • • A measure of the central tendency The variance of X is denoted by V(X) or var(X) or σ 2 � V(X) = E( (X – E[X]) 2 ) • Definition: V(X) = E(X 2 ) – ( E(x) ) 2 • Also, • A measure of the spread or variation of the possible values of X around the mean The standard deviation of X is denoted by σ � σ = V ( x ) • Definition: • Expressed in the same units as the mean Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 10

  11. Computer Science, Informatik 4 Communication and Distributed Systems Expectations � Example: The mean of life of the previous inspection device is: ∞ − x 1 − ∞ ∞ / 2 xe ∫ ∫ − − = = + = x x E X xe / 2 dx e / 2 dx ( ) 2 2 0 0 0 � To compute variance of X , we first compute E(X 2 ) : ∞ − x 1 − ∞ ∞ / 2 x e ∫ ∫ 2 − − = x = + x = E X 2 x 2 e / 2 dx e / 2 dx ( ) 8 2 0 0 0 � Hence, the variance and standard deviation of the device’s life are: = − = V X 2 ( ) 8 2 4 σ = = V X ( ) 2 Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 11

  12. Computer Science, Informatik 4 Communication and Distributed Systems Expectations ∞ − x 1 − ∞ ∞ / 2 xe ∫ ∫ − − = = + = x x E X xe / 2 dx e / 2 dx ( ) 2 2 0 0 0 ∞ − x 1 − ∞ ∞ / 2 xe ∫ ∫ − − = = + = x x E X xe / 2 dx e / 2 dx ( ) 2 2 0 0 0 Partial Integratio n ∫ ∫ = − u x v x dx u x v x u x v x dx ( ) ' ( ) ( ) ( ) ' ( ) ( ) Set = u x x ( ) − = x v x e / 2 ' ( ) ⇒ = u x ' ( ) 1 = − − x v x e / 2 ( ) 2 ∞ 1 ∞ 1 ∞ ∫ ∫ − − − = x = ⋅ − x − ⋅ − x E X xe / 2 dx x e / 2 e / 2 dx ( ) ( ( 2 ) 1 ( 2 ) ) 2 2 0 0 0 Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 12

  13. Computer Science, Informatik 4 Communication and Distributed Systems Useful Statistical Models � In this section, statistical models appropriate to some application areas are presented. The areas include: • Queueing systems • Inventory and supply-chain systems • Reliability and maintainability • Limited data Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 13

  14. Computer Science, Informatik 4 Communication and Distributed Systems Useful models – Queueing Systems � In a queueing system, interarrival and service-time patterns can be probabilistic . � Sample statistical models for interarrival or service time distribution: • Exponential distribution: if service times are completely random • Normal distribution: fairly constant but with some random variability (either positive or negative) • Truncated normal distribution: similar to normal distribution but with restricted value. • Gamma and Weibull distribution: more general than exponential (involving location of the modes of pdf’s and the shapes of tails.) Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 14

  15. Computer Science, Informatik 4 Communication and Distributed Systems Useful models – Inventory and supply chain In realistic inventory and supply-chain systems, there are at � least three random variables: • The number of units demanded per order or per time period • The time between demands • The lead time = Time between placing an order and the receipt of that order � Sample statistical models for lead time distribution: • Gamma Sample statistical models for demand distribution: � • Poisson: simple and extensively tabulated. • Negative binomial distribution: longer tail than Poisson (more large demands). • Geometric: special case of negative binomial given at least one demand has occurred. Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 15

  16. Computer Science, Informatik 4 Communication and Distributed Systems Useful models – Reliability and maintainability � Time to failure (TTF) • Exponential: failures are random • Gamma: for standby redundancy where each component has an exponential TTF • Weibull: failure is due to the most serious of a large number of defects in a system of components • Normal: failures are due to wear Dr. Mesut Güne ş Chapter 4. Statistical Models in Simulation 16

Recommend


More recommend