SlideShare a Scribd company logo
CS-438
COMPUTER SYSTEMS MODELING
Spring Semester 2023
Batch: 2019
(WEEK # 5: LECTURE # 09 - 10)
FAKHRA AFTAB
LECTURER
DEPARTMENT OF COMPUTER & INFORMATION SYSTEMS ENGINEERING
NED UNIVERSITY OF ENGINEERING & TECHNOLOGY
1
REVIEW OF PROBABILITY
THEORY
Chapter # 2
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Definitions
1) Random Experiment
A random experiment is a process whose outcome is not known in
advance but for which the set of all possible individual outcomes is
known.
2) Trial
Single performance of a random experiment is called a trial.
3) Sample Space
The set of all possible outcomes of a random experiment is called its
sample space, usually denoted by S.
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Definitions (Cont’d)
4) Event
An event is a subset of sample space.
5) Probability
Probability of an event A, denoted P(A), is defined as:
𝑃(𝐴)=
|𝐴|
|𝑆|
6) Independent Trials
If an experiment involves a sequence of independent but identical
stages, we say that we have a sequence of independent trials.
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Definitions (Cont’d)
7) Bernoulli Trials
In the special case where there are only two possible outcomes in each
trial, we say that we have a sequence of independent Bernoulli trials.
8) Random Variable
A random variable X is defined as:
X: S → ℝ
Discrete random variable assumes finite or countably infinite values,
whereas, a continuous random variable can assume infinite values.
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Definitions (Cont’d)
Example:
Consider two Bernoulli trials.
Then, S = {HH, HM, MH, MM}.
Let’s define a random variable X giving number of hits in the two trials.
s P (s) X(s)
HH ¼ 2
HM ¼ 1
MH ¼ 1
MM ¼ 0
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Definitions (Cont’d)
9) Probability Mass Function
Probability mass function (pmf) of a discrete random variable X is
defined as:
From the basic axioms of probability,
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Continuing with the example mentioned under random variable, what
will be the pmf of X? i.e. p(0), p(1) and p(2)?
• p(0) = ¼
• P(1) = ½
• P(2) = ¼
s P (s) X(s)
HH ¼ 2
HM ¼ 1
MH ¼ 1
MM ¼ 0
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Definitions (Cont’d)
10) Probability Distribution Function
Probability distribution function FX(t), also known as cumulative
distribution function (CDF) of a discrete random variable X is defined as:
It gives the probability of X acquiring a value less than or equal to ‘t’ in its
range.
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Commonly used Discrete Probability Distributions
Poisson Distribution
• This models occurrences of an event, generally regarded as successes
(or failures, depending upon the context) in a given time duration.
• The Poisson pmf is given by:
• The parameter α is related to time duration t as follows:
α = λt
where, λ is interpreted as the rate of occurring successes.
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Commonly used Discrete Probability Distributions
• When n is large and p is small, the Poisson pmf (distribution) can also
be used as a convenient approximation to the binomial pmf
(distribution).
• As a rule of thumb, we use it when n ≥ 20 and p ≤ 0.05
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Example
Queries to a database server arrive at a rate of 12/hour. Calculate the
probability that:
a) Exactly six queries will arrive in next 30 min?
b) Three or more queries will arrive in next 15 min?
c) Two, three or four queries will arrive in next 5 minutes?
Solution:
α = λt , here λ = 12/hour
α = 12t
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Part a)
t = 0.5 hour
Therefore α = 6.
P[X=6] =
ⅇ−𝛼𝛼𝑘
𝑘!
=
ⅇ−666
6!
=0.1606
Part b)
α = 12x1/4 = 3
P[X≥3] = 1 – P[X < 3]
= 1 – σ𝑘=0
2 ⅇ−𝛼𝛼𝑘
𝑘!
= 1 – [ⅇ−𝛼
{1 +
3
1!
+
32
2!
}]
= 0.5768
Part c)
α = 12x5/60 = 1
P[X=2] + P[X=3] + P[X=4] = 0.2606
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Exponential Distribution (Continuous Distribution)
• It is used to model the time elapsed between events.
• If the number of arrivals at a service facility during a specified period
follows Poisson distribution, then,
• automatically, the distribution of the time interval between successive arrivals
must follow the negative exponential (or, simply, exponential) distribution.
• Specifically, if λ is the rate at which Poisson events occur, then the
distribution of time between successive arrivals, t, f(t) = λe-λt, t > 0
• The mean and variance of the exponential distribution are:
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
𝐸 𝑡 =
1
𝜆
𝑣𝑎𝑟 𝑡 =
1
𝜆
• The mean E{t} is consistent with the definition of λ.
• If λ is the rate at which events occur, then 1/λ is the average time
interval between successive events.
Applications:
• The exponential distribution is one of the widely used continuous
distributions.
• In most queuing situations, the arrival of customers occurs in a totally
random fashion.
• Exponential distribution is widely used to model time in different
applications e.g. inter arrival time of customers entering a system,
lifetime of hardware components, waiting and service times in a
queuing system.
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Rare Events
• When two events are extremely unlikely to occur simultaneously or
within a very short period of time, they are called rare or Poissonian
events, as they are modeled using Poisson distribution.
• Job arrivals to a system, telephone calls, e-mail messages, network
breakdowns, virus attacks, software errors are examples of rare
events.
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Inter-arrival Times of Rare Events are Exponential
• Let N be a Poisson random variable denoting number of customers
arriving to a system in the interval (0, t]. Hence,
• Let T be a random variable denoting interarrival time of customers.
Then,
• where the parameter α = λt
• which shows that interarrival times are exponentially distributed
when arrivals occur according to Poisson distribution
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Memoryless Property
• Let T be a random variable denoting service time of a server.
• Suppose that a job currently with the server has already consumed
service time t.
• We are interested in the probability that the job will stay with the
server for additional time s; i.e. we wish to calculate the conditional
probability P[T > t + s | T > t]
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Memoryless Property
• Exponential distribution exhibits a unique property, known as memoryless
property. Let us first establish this property using mathematics, followed
by its intuitive explanation.
• Memoryless property for exponentially distributed lifetimes would mean
that the probability of a component surviving for some additional time
would be independent of how long it has been operating. This means that
component shows no sign of aging.
• This is independent of t which means that the probability of spending an
additional service time does not depend on the time that has already been
spent with the server.
• Past has no bearing on future and hence the name memoryless property.
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
This memoryless
property is not for
students! It is ONLY
for exponential
distribution!

More Related Content

PPTX
Chapter_5 Exponential distribution.pptx
PPTX
Statistics5,c.xz,c.;c.;d.c;d;ssssss.pptx
PPTX
BDA_MO_1_S7_Apply_basic_analytics_methods_such_as_distributions.pptx
PPT
Chapter0
PDF
3. The Exponential Distribution and the Poisson Process.pdf
PPT
PPTX
Poission distribution
PPTX
Unit II PPT.pptx
Chapter_5 Exponential distribution.pptx
Statistics5,c.xz,c.;c.;d.c;d;ssssss.pptx
BDA_MO_1_S7_Apply_basic_analytics_methods_such_as_distributions.pptx
Chapter0
3. The Exponential Distribution and the Poisson Process.pdf
Poission distribution
Unit II PPT.pptx

Similar to CS-438 COMPUTER SYSTEM MODELING WK5LEC9-10.pdf (20)

PDF
Please explain both Poisson and exponential distributions and the di.pdf
PPTX
Probablity & queueing theory basic terminologies & applications
PDF
Different types of distributions
PPTX
Statistical Analysis with R- III
PDF
PTSP PPT.pdf
PPT
Distribution function
PPTX
Econometrics 2.pptx
PPTX
maths ppt on poisson distribution statistics and probability.pptx
PDF
Lecture 1,2 maths presentation slides.pdf
PDF
Bai giang Chapter 6 avandce math for engeneering
PDF
Welcome to International Journal of Engineering Research and Development (IJERD)
PDF
Deep learning .pdf
PDF
FullMLCheatSheetfor engineering students .pdf
PPTX
Poisson Distribution and binomial distribution
PPTX
Probability Distribution & Modelling
PDF
Decision Sciences_SBS_10.pdf
PDF
Statistics (recap)
PPTX
probability distribution term 1 IMI .pptx
PPTX
pre - PSP - Discrete Probabilitty Distribution_modified 05-03-2025.pptx
Please explain both Poisson and exponential distributions and the di.pdf
Probablity & queueing theory basic terminologies & applications
Different types of distributions
Statistical Analysis with R- III
PTSP PPT.pdf
Distribution function
Econometrics 2.pptx
maths ppt on poisson distribution statistics and probability.pptx
Lecture 1,2 maths presentation slides.pdf
Bai giang Chapter 6 avandce math for engeneering
Welcome to International Journal of Engineering Research and Development (IJERD)
Deep learning .pdf
FullMLCheatSheetfor engineering students .pdf
Poisson Distribution and binomial distribution
Probability Distribution & Modelling
Decision Sciences_SBS_10.pdf
Statistics (recap)
probability distribution term 1 IMI .pptx
pre - PSP - Discrete Probabilitty Distribution_modified 05-03-2025.pptx
Ad

More from MUHAMMADUSMANYOUSUF1 (6)

PDF
CS-438 COMPUTER SYSTEM MODELINGWK9+10LEC17-19.pdf
PPTX
MPS mucopolysaccharidoses IN MEDICAL.pptx
PPTX
presentationETT, USED FOR THE DIAGNOSIS OF .pptx
PDF
CS-438 computer system modeling WK6+7LEC11-14.pdf
PDF
CS-438 COMPUTER SYSTEMS MODELING WK1LEC1-2.pdf
PDF
CS-438 WK13-15LEC25-30 Computer System Modeling.pdf
CS-438 COMPUTER SYSTEM MODELINGWK9+10LEC17-19.pdf
MPS mucopolysaccharidoses IN MEDICAL.pptx
presentationETT, USED FOR THE DIAGNOSIS OF .pptx
CS-438 computer system modeling WK6+7LEC11-14.pdf
CS-438 COMPUTER SYSTEMS MODELING WK1LEC1-2.pdf
CS-438 WK13-15LEC25-30 Computer System Modeling.pdf
Ad

Recently uploaded (20)

PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Introduction to Artificial Intelligence
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Digital Strategies for Manufacturing Companies
PDF
System and Network Administraation Chapter 3
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
medical staffing services at VALiNTRY
PPTX
Transform Your Business with a Software ERP System
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Introduction to Artificial Intelligence
Understanding Forklifts - TECH EHS Solution
Odoo Companies in India – Driving Business Transformation.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
Digital Strategies for Manufacturing Companies
System and Network Administraation Chapter 3
2025 Textile ERP Trends: SAP, Odoo & Oracle
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
medical staffing services at VALiNTRY
Transform Your Business with a Software ERP System
Operating system designcfffgfgggggggvggggggggg
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Navsoft: AI-Powered Business Solutions & Custom Software Development

CS-438 COMPUTER SYSTEM MODELING WK5LEC9-10.pdf

  • 1. CS-438 COMPUTER SYSTEMS MODELING Spring Semester 2023 Batch: 2019 (WEEK # 5: LECTURE # 09 - 10) FAKHRA AFTAB LECTURER DEPARTMENT OF COMPUTER & INFORMATION SYSTEMS ENGINEERING NED UNIVERSITY OF ENGINEERING & TECHNOLOGY 1
  • 2. REVIEW OF PROBABILITY THEORY Chapter # 2 Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 3. Definitions 1) Random Experiment A random experiment is a process whose outcome is not known in advance but for which the set of all possible individual outcomes is known. 2) Trial Single performance of a random experiment is called a trial. 3) Sample Space The set of all possible outcomes of a random experiment is called its sample space, usually denoted by S. Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 4. Definitions (Cont’d) 4) Event An event is a subset of sample space. 5) Probability Probability of an event A, denoted P(A), is defined as: 𝑃(𝐴)= |𝐴| |𝑆| 6) Independent Trials If an experiment involves a sequence of independent but identical stages, we say that we have a sequence of independent trials. Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 5. Definitions (Cont’d) 7) Bernoulli Trials In the special case where there are only two possible outcomes in each trial, we say that we have a sequence of independent Bernoulli trials. 8) Random Variable A random variable X is defined as: X: S → ℝ Discrete random variable assumes finite or countably infinite values, whereas, a continuous random variable can assume infinite values. Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 6. Definitions (Cont’d) Example: Consider two Bernoulli trials. Then, S = {HH, HM, MH, MM}. Let’s define a random variable X giving number of hits in the two trials. s P (s) X(s) HH ¼ 2 HM ¼ 1 MH ¼ 1 MM ¼ 0 Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 7. Definitions (Cont’d) 9) Probability Mass Function Probability mass function (pmf) of a discrete random variable X is defined as: From the basic axioms of probability, Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 8. Continuing with the example mentioned under random variable, what will be the pmf of X? i.e. p(0), p(1) and p(2)? • p(0) = ¼ • P(1) = ½ • P(2) = ¼ s P (s) X(s) HH ¼ 2 HM ¼ 1 MH ¼ 1 MM ¼ 0 Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 9. Definitions (Cont’d) 10) Probability Distribution Function Probability distribution function FX(t), also known as cumulative distribution function (CDF) of a discrete random variable X is defined as: It gives the probability of X acquiring a value less than or equal to ‘t’ in its range. Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 10. Commonly used Discrete Probability Distributions Poisson Distribution • This models occurrences of an event, generally regarded as successes (or failures, depending upon the context) in a given time duration. • The Poisson pmf is given by: • The parameter α is related to time duration t as follows: α = λt where, λ is interpreted as the rate of occurring successes. Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 11. Commonly used Discrete Probability Distributions • When n is large and p is small, the Poisson pmf (distribution) can also be used as a convenient approximation to the binomial pmf (distribution). • As a rule of thumb, we use it when n ≥ 20 and p ≤ 0.05 Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 12. Example Queries to a database server arrive at a rate of 12/hour. Calculate the probability that: a) Exactly six queries will arrive in next 30 min? b) Three or more queries will arrive in next 15 min? c) Two, three or four queries will arrive in next 5 minutes? Solution: α = λt , here λ = 12/hour α = 12t Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 13. Part a) t = 0.5 hour Therefore α = 6. P[X=6] = ⅇ−𝛼𝛼𝑘 𝑘! = ⅇ−666 6! =0.1606 Part b) α = 12x1/4 = 3 P[X≥3] = 1 – P[X < 3] = 1 – σ𝑘=0 2 ⅇ−𝛼𝛼𝑘 𝑘! = 1 – [ⅇ−𝛼 {1 + 3 1! + 32 2! }] = 0.5768 Part c) α = 12x5/60 = 1 P[X=2] + P[X=3] + P[X=4] = 0.2606 Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 14. Exponential Distribution (Continuous Distribution) • It is used to model the time elapsed between events. • If the number of arrivals at a service facility during a specified period follows Poisson distribution, then, • automatically, the distribution of the time interval between successive arrivals must follow the negative exponential (or, simply, exponential) distribution. • Specifically, if λ is the rate at which Poisson events occur, then the distribution of time between successive arrivals, t, f(t) = λe-λt, t > 0 • The mean and variance of the exponential distribution are: Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET) 𝐸 𝑡 = 1 𝜆 𝑣𝑎𝑟 𝑡 = 1 𝜆
  • 15. • The mean E{t} is consistent with the definition of λ. • If λ is the rate at which events occur, then 1/λ is the average time interval between successive events. Applications: • The exponential distribution is one of the widely used continuous distributions. • In most queuing situations, the arrival of customers occurs in a totally random fashion. • Exponential distribution is widely used to model time in different applications e.g. inter arrival time of customers entering a system, lifetime of hardware components, waiting and service times in a queuing system. Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 16. Rare Events • When two events are extremely unlikely to occur simultaneously or within a very short period of time, they are called rare or Poissonian events, as they are modeled using Poisson distribution. • Job arrivals to a system, telephone calls, e-mail messages, network breakdowns, virus attacks, software errors are examples of rare events. Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 17. Inter-arrival Times of Rare Events are Exponential • Let N be a Poisson random variable denoting number of customers arriving to a system in the interval (0, t]. Hence, • Let T be a random variable denoting interarrival time of customers. Then, • where the parameter α = λt • which shows that interarrival times are exponentially distributed when arrivals occur according to Poisson distribution Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 18. Memoryless Property • Let T be a random variable denoting service time of a server. • Suppose that a job currently with the server has already consumed service time t. • We are interested in the probability that the job will stay with the server for additional time s; i.e. we wish to calculate the conditional probability P[T > t + s | T > t] Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 19. Memoryless Property • Exponential distribution exhibits a unique property, known as memoryless property. Let us first establish this property using mathematics, followed by its intuitive explanation. • Memoryless property for exponentially distributed lifetimes would mean that the probability of a component surviving for some additional time would be independent of how long it has been operating. This means that component shows no sign of aging. • This is independent of t which means that the probability of spending an additional service time does not depend on the time that has already been spent with the server. • Past has no bearing on future and hence the name memoryless property. Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET)
  • 20. Prepared by: Ms. Fakhra Aftab (Lecturer, CISD, NEDUET) This memoryless property is not for students! It is ONLY for exponential distribution!