Download Document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Statistics wikipedia , lookup

History of statistics wikipedia , lookup

Inductive probability wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability interpretations wikipedia , lookup

Probability wikipedia , lookup

Transcript
Network Performance and
Quality of Service
4. Overview of Probability
Motivation

Provide a brief review of topics that will help
us:




RQ12
Statistically characterize network traffic flow
Model and estimate performance parameters
Set stage for discussion of traffic
management and routing later in the course
NOT a condensed class in probability theory
2
Definitions of Probability Theory



Probability is concerned with assignment of
numbers to events.
Pr[A] of an event A is a number between 0
and 1 that corresponds to the likelihood that
the event A will occur.
There are a number definitions of
probability, we will discuss only three
1.
2.
3.
RQ12
Classical Definition
Relative Frequency Definition
Axiomatic Definition
3
Classical Definition

If a random experiment (process with
an uncertain outcome) can result in N
mutually exclusive and equally likely
outcomes, and if NA is the number of
outcomes in which event A occurs,
then the probability of A is
Pr[A] =
RQ12
NA
N
4
Classical Definition

Example: If we roll a die …




There are 6 equally likely outcomes i.e. N=6
There are three outcomes that correspond
to the event [even].
NA
3
In this case, Pr[even] = N = 6 = 0.5
Example: If we roll two dice …


There are 36 equally likely outcomes (6x6)
The probability that the sum is 7 is 6 .
36
RQ12
5
Classical Definition
 What
if N is not finite?
 In
that case, the Classical definition is not
applicable.
 What
if the outcomes are not equally likely?
 Again,
the Classical definition of probability is
not applicable.
 In
such cases, how might we define the
probability of an outcome that has event A?
RQ12
6
Relative Frequency Definition

If a random experiment is repeated a large
number of times, say n times, under
identical conditions and if an event A is
observed to occur nA times, then the
probability of A is
lim nA
Pr[A] = n  n

The foundation of this approach is that there is
some Pr[A]. We cannot deduce it, as in Classical
probability, but we can estimate it.
RQ12
7
Relative Frequency Definition

Example:


one tosses a coin, which might or might
not be fair, 100 times and observes
heads on 52 of the tosses.
One’s estimate of the probability of a
52
head is
10
Pr[head] ≈
or 0.52
0
RQ12
8
Axiomatic Definition


The axiomatic approach build up probability
theory from a number of assumptions
(axioms).
From these axioms, laws of probability are
derived that can be used for calculations.
Common Axioms:
1. 0  Pr[A]  1 for each even A
2. Pr[] = 1
3. Pr[A  B] = Pr[A] + Pr[B] if A and B are mutually
exclusive
RQ12
9
Axiomatic
Definition
Important Laws:
1. Pr[A] = 1 - Pr[A]
2. Pr[A  B] = 0 (if A and B
are mutually exclusive)
3. Pr[A  B] = Pr[A] + Pr[B]
– Pr[A  B]
4. Pr[A  B  C] =
Pr[A] + Pr[B] + Pr[C]
– Pr[A  B]
– Pr[A  C]
– Pr[B  C]
+ Pr[A  B  C]
RQ12
10
Axiomatic Definition

Example: If we roll a die …




If we assume that each of the 6 outcomes are
equally likely, probability of each will be ⅙.
Pr[even] = Pr[2] + Pr[4] + Pr[6] = ½
Pr[less than 3] = Pr[1] + Pr[2] = ⅓
Pr[{even} U {less than 3}]
= Pr[even] + Pr[less than 3] – Pr[2]
=½+⅓–⅙
=⅔
RQ12
11
Conditional Probability

The conditional probability of an event A, given
that event B has occurred is:
Pr[AB]
Pr[AB] =
Pr[B]

Pr[AB] ≅ Pr[AB] ≅ Pr[A and B]
A and B are independent events if
Pr[AB] = Pr[A]Pr[B]
RQ12
12
Conditional Probability

Example: What is the probability of
getting a sum of 8 on the roll of two dice
if we know that the face of at least one
die is an even number?

Let, A = [sum of 8], B = [at least 1 die even]
Pr[AB]
Pr[A | B] =
Pr[B]
RQ12
=
1/12
¾
=
1
9
13
Total Probability


Given a set of mutually exclusive events
E1, E2, …, En covering all possible
outcomes, and
Given an arbitrary event A, then:
n
Pr[A] = ∑ Pr[AEi]Pr[Ei]
i=1
RQ12
14
Bayes’s Theorem

“Posterior odds” – the probability that an
event really occurred, given evidence in
favor of it:
Pr[AEi] Pr[Ei]
Pr[EiA] =
Pr[A]
Pr[AEi] Pr[Ei]
=
 Pr[AEi]Pr[Ei]
n
i=1
RQ12
15
Bayes’s Theorem Example





Hit & run accident involving a taxi
85% of taxis are yellow, 15% are black
Eyewitness reported that the taxi involved in
the accident was black
Data shows that eyewitnesses are correct on
car color 80% of the time
What is the probability that the cab was black?
Pr[Black|WB] =
=
RQ12
Pr[WB|Black] Pr[Black]
Pr[WB|Black] Pr[Black] + Pr[WB|Yellow] Pr[Yellow]
(0.8)(0.15)
= 0.41
(0.8)(0.15) + (0.2)(0.85)
16
Bayes’s Theorem Example
Error Injection
Sender S




Receiver R
Network injects errors (flips bits)
Assume Pr[S1] = p = Pr[S0] = 1-p = 0.5
Assume Pr[R1] = Pr[R0] = 0.5
Given error injection, such that
Pr[R0S1] =pa and Pr[R1S0] =pb,
then :
Pr[R0S1] Pr[S1]
Pr[S1R0] =
RQ12
Pr[R0S1] Pr[S1] + Pr[R0S0] Pr[S0]
=
pa p
pa p + (1-pb)(1-p)
17
Random Variables

A random variable is a variable whose
possible values are numerical outcomes
of a random phenomenon.


As opposed to other variables, a random
variable conceptually does not have a
single, fixed value; rather, it can take on a
set of possible different values (each with
an associated probability).
There are two types of random
variables, discrete and continuous.
RQ12
18
Random Variables

1.
2.
Examples:
Select a soccer player;
X = the number of goals the player has
scored during the season.
The values of X are 0, 1, 2, 3, ...
Survey a group of 10 soccer players;
Y = the average number of goals scored by
the players during the season.
The values of Y are 0, 0.1, 0.2,....,1.0, 1.1, …
RQ12
19
Random Variables

A discrete random variable can take on
only specific, isolated numerical values.


e.g. number of packets dropped during
transmission
A continuous random variable is one
which takes an infinite number of possible
values.

RQ12
e.g. delay experienced by packets during
transmission
20
Random Variables



Discrete random variables are described
by a probability function Px(k) = Pr[X=k]
Continuous random variables can be
described by either a distribution function
or a density function.
Random variable characteristics:




RQ12
Mean value: E[X]
Second moment: E[X2]
Variance: Var[X] = E[X2] - E[X]2
Standard deviation: X = (Var[X])½
21
Cumulative Distribution Function

RQ12
The Cumulative Distribution Function
(CDF) of a random variable maps a
given value a to the probability of the
variable taking a value less than or
equal to a:
FX (a) = Pr[X ≤ a]
22
Probability Density Function


The above derivative of the CDF F(x) is
called the probability density function of x.
Given a pdf f(x), the probability of x being
in the interval (x1, x2) can also be
computed by integration:
RQ12
23
Mean and Variance

Mean or Expected Value

Variance:
RQ12
24
Probability Distributions
Exponential Distribution
Exponential Density
E[X] = X = 1/
F(x) = Pr[Xx] = 1 –
RQ12
e-x
f(x) =
d
-x
F(x)
=
e
dx
25
Probability Distributions
Exponential Distribution
F(x) = Pr[Xx] = 1 –
RQ12
e-x
Exponential Density
f(x) =
d
-x
F(x)
=
e
dx
26
Probability Distributions
Poisson Distribution
Normal Density
E[X] = Var[X] = 
k -
Pr[X=k] =
e
k!
RQ12
f(x) =
e-(x-)2/22
 2
27
Probability Distributions –
Relevance to Networks 2
Service times of queues (ttrans) in
packet switching routers can be
effectively modeled as exponential
Arrival pattern of packets at a router is
often Poisson in nature



and, arrival interval is exponential (why?)
Central Limit Theorem: the distribution
of a very large number of independent
RVs is approximately normal,
independent of individual distributions

RQ12
28