Ciberseguridad Probability, Random Processes and Inference Dr. - - PowerPoint PPT Presentation

ciberseguridad
SMART_READER_LITE
LIVE PREVIEW

Ciberseguridad Probability, Random Processes and Inference Dr. - - PowerPoint PPT Presentation

INSTITUTO POLITCNICO NACIONAL CENTRO DE INVESTIGACION EN COMPUTACION Laboratorio de Ciberseguridad Probability, Random Processes and Inference Dr. Ponciano Jorge Escamilla Ambrosio pescamilla@cic.ipn.mx http://www.cic.ipn.mx/~pescamilla/


slide-1
SLIDE 1

INSTITUTO POLITÉCNICO NACIONAL CENTRO DE INVESTIGACION EN COMPUTACION

Probability, Random Processes and Inference

  • Dr. Ponciano Jorge Escamilla Ambrosio

pescamilla@cic.ipn.mx http://www.cic.ipn.mx/~pescamilla/

Laboratorio de Ciberseguridad

slide-2
SLIDE 2

CIC

2

Course Course Content Content

1.4. General Random Variables 1.4.1. Continuous Random Variables and PDFs 1.4.2. Cumulative Distribution Function 1.4.3. Normal Random Variables 1.4.4. Joint PDFs of Multiple Random Variables 1.4.5. Conditioning 1.4.6. The Continuous Bayes’ Rule 1.4.7. The Strong Law of Large Numbers

slide-3
SLIDE 3

CIC

 Continuous random variables

  • The velocity of a vehicle traveling along the highway

 Continuous random variables can take on any real

value in an interval.

  • possibly of infinite length, such as (0,) or the entire real

line.

 In this section the concepts and method for discrete

r.v.s, such as expectation, PMF, and conditioning, for their continuous counterparts are introduced.

3

General General Random Random Variables Variables

slide-4
SLIDE 4

CIC

 Continuous random variable. A random variable is

called continuous if there exists a non negative function fX, called the probability density function

  • f X, or PDF, such that:

 For every subset B of the real line

4

Probabilit Probability y Density Density Function Function

slide-5
SLIDE 5

CIC

 The probability that the value of X falls within an

interval is: which can be interpreted as the area under the graph of the PDF.

5

Probabilit Probability y Density Density Function Function

slide-6
SLIDE 6

CIC

6

Probabilit Probability y Density Density Function Function

slide-7
SLIDE 7

CIC

 For any single value a, we have:  For this reason, including or excluding the endpoints

  • f an interval has no effect on its probability:

7

Probabilit Probability y Density Density Function Function

slide-8
SLIDE 8

CIC

 To qualify as a PDF, a function fX must be:

  • nonnegative, i.e., fX(x)  0 for every x,
  • have the normalisation property:

 Graphically, this means that the entire area under the

graph of the PDF must be equal to 1.

8

Probabilit Probability y Density Density Function Function

slide-9
SLIDE 9

CIC

9

Discret Discrete e vs.

  • vs. continuous

continuous r.v.s r.v.s.

Recall that for a discrete r.v., the CDF jumps at every point in the support, and is flat everywhere else. In contrast, for a continuous r.v. the CDF increases smoothly.

slide-10
SLIDE 10

CIC

 For a continuous r.v. X with CDF, FX(x), the

probability density function (PDF) of X is the derivative fX(x) of the CDF, given by fX(x) = F′X (x). The support of X, and of its distribution, is the set of all x where fX(x) > 0.

 The PDF represents the “density” of probability at

the point x.

10

Discret Discrete e vs.

  • vs. continuous

continuous r.v.s r.v.s.

slide-11
SLIDE 11

CIC

 To get from the PDF back to the CDF we apply:  Thus, analogous to how we obtained the value of a

discrete CDF at x by summing the PMF over all values less than or equal to x; here we integrate the PDF over all values up to x, so the CDF is the accumulated area under the PDF.

11

Probabilit Probability y Density Density Function Function

slide-12
SLIDE 12

CIC

 Since we can freely convert between the PDF and

the CDF using the inverse operations of integration and differentiation, both the PDF and CDF carry complete information about the distribution of a continuous r.v.

 Thus the PDF completely specifies the behavior

  • f continuous random variables.

12

Probabilit Probability y Density Density Function Function

slide-13
SLIDE 13

CIC

 For an interval [x, x+] with very small length , we

have: So we can view fX(x) as the “probability mass per unit length” near x.

13

Probabilit Probability y Density Density Function Function

Even though a PDF is used to calculate event probabilities, fX(x) is not the probability of any particular event. In particular, it is not restricted to be less than or equal to one.

slide-14
SLIDE 14

CIC

 An important way in which continuous r.v.s differ

from discrete r.v.s is that for a continuous r.v. X, P(X = x) = 0 for all x. This is because P(X = x) is the height of a jump in the CDF at x, but the CDF of X has no jumps! Since the PMF of a continuous r.v. would just be 0 everywhere, we work with a PDF instead.

14

Probabilit Probability y Density Density Function Function

slide-15
SLIDE 15

CIC

 The PDF is analogous to the PMF in many ways, but

there is a key difference: for a PDF fX , the quantity fX(x) is not a probability, and in fact it is possible to have fX(x) > 1 for some values of x. To obtain a probability, we need to integrate the PDF.

 In summary:

  • To get a desired probability, integrate the PDF over

the appropriate range.

15

Probabilit Probability y Density Density Function Function

slide-16
SLIDE 16

CIC

 The Logistic distribution has CDF:  To get the PDF, we differentiate the CDF, which

gives:

 Example:

16

Examples Examples of PDFs

  • f PDFs
slide-17
SLIDE 17

CIC

17

Examples Examples of PDFs

  • f PDFs
slide-18
SLIDE 18

CIC

 The Rayleigh distribution has CDF:  To get the PDF, we differentiate the CDF, which

gives:

 Example:

18

Examples Examples of PDFs

  • f PDFs
slide-19
SLIDE 19

CIC

19

Examples Examples of PDFs

  • f PDFs
slide-20
SLIDE 20

CIC

 A continuous r.v. X is said to have Uniform

distribution on the interval (a, b) if its PDF is:

 The CDF is the accumulated area under the PDF:

20

Examples Examples of PDFs

  • f PDFs
slide-21
SLIDE 21

CIC

 We denote this by X  Unif(a, b).  The Uniform distribution that we will most frequently

use is the Unif(0, 1) distribution, also called the standard Uniform.

 The Unif(0, 1) PDF and CDF are particularly simple:

f(x) = 1 and F(x) = x for 0 < x < 1.

 For a general Unif(a, b) distribution, the PDF is

constant on (a, b), and the CDF is ramp-shaped, increasing linearly from 0 to 1 as x ranges from a to b.

21

Examples Examples of PDFs

  • f PDFs
slide-22
SLIDE 22

CIC

22

Examples Examples of PDFs

  • f PDFs

For Uniform distributions, probability is proportional to length.

slide-23
SLIDE 23

CIC

23

PDF Propert PDF Properties ies

slide-24
SLIDE 24

CIC

 The expected value or expectation or mean of a

continuous r.v. X is defined by:

 This sis similar to the discrete case except that the

PMF is replaced by the PDF, and summation is replaced by integration.

 Its mathematical properties are similar to the discrete

case.

24

Expected Value and Expected Value and Variance of a Variance of a Continuous Continuous r.v r.v.

slide-25
SLIDE 25

CIC

 If X is a continuous random variable with given

PDF, then any real-valued function Y = ɡ(X) of X is also a random variable.

  • Note that Y can be a continuous r.v., but Y can also be

discrete, e.g., ɡ(x) = 1 for x ˃ 0 and ɡ(x) = 0, otherwise.

 In either case, the mean of ɡ(X) satisfies the

expected value rule:

25

Expected Value and Expected Value and Variance of a Variance of a Continuous Continuous r.v r.v.

slide-26
SLIDE 26

CIC

 The nth moment of a continuous r.v. X is defined as

E[Xn], the expected value of the random variable Xn.

 The variance of X denoted as var(X), is defined as the

expected value of the random variable (X - E[Xn])2 :

26

Expected Value and Expected Value and Variance of a Variance of a Continuous Continuous r.v r.v.

slide-27
SLIDE 27

CIC

 Example. Consider a uniform PDF over an interval

[a, b], its expectation is given by:

27

Expected Value and Expected Value and Variance of a Variance of a Continuous Continuous r.v r.v.

slide-28
SLIDE 28

CIC

 Its variance is given as:

28

Expected Value and Expected Value and Variance of a Variance of a Continuous Continuous r.v r.v.

slide-29
SLIDE 29

CIC

 The exponential continuous random variable has

PDF: where  is a positive parameter characterising the PDF, with

29

Expected Value and Expected Value and Variance of a Variance of a Continuous Continuous r.v r.v.

slide-30
SLIDE 30

CIC

 The probability that X exceeds a certain value

decreases exponentially. This is, for any a  0, we have:

 An exponential random variable can be a good

model for the amount of time until an incident of interest takes place.

  • a message arriving at a computer, some equipment

breaking down, a light bulb burning out, etc.

30

Expected Value and Expected Value and Variance of a Variance of a Continuous Continuous r.v r.v.

slide-31
SLIDE 31

CIC

31

Expected Value and Expected Value and Variance of a Variance of a Continuous Continuous r.v r.v.

slide-32
SLIDE 32

CIC

 The mean of the exponential r.v. X is calculated by:

32

Expected Value and Expected Value and Variance of a Variance of a Continuous Continuous r.v r.v.

slide-33
SLIDE 33

CIC

 The variance of the exponential r.v. X is calculated

by:

33

Expected Value and Expected Value and Variance of a Variance of a Continuous Continuous r.v r.v.

slide-34
SLIDE 34

CIC

 The cumulative distribution function, CDF, of a

random variable X is denoted as FX and provides the probability P(X  x). In particular for every x we have:

34

Cumulative Cumulative Distr Distribution ibution Functions Functions

The CDF FX(x) “accumulates” probability “up to” the value of x.

slide-35
SLIDE 35

CIC

 Any random variable associated with a given

probability model has CDF, regardless of whether it is discrete or continuous.

  • {X  x} is always an event and therefore has well-defined

probability.

35

Cumulative Cumulative Distr Distribution ibution Functions Functions

slide-36
SLIDE 36

CIC

36

Cumulative Cumulative Distr Distribution ibution Functions Functions

slide-37
SLIDE 37

CIC

37

Cumulative Cumulative Distr Distribution ibution Functions Functions

slide-38
SLIDE 38

CIC

38

Cumulative Cumulative Distr Distribution ibution Functions Functions

slide-39
SLIDE 39

CIC

39

Cumulative Cumulative Distr Distribution ibution Functions Functions

slide-40
SLIDE 40

CIC

40

Normal Normal Random Random Variables Variables

 A continuous random variable X is normal or

Gaussian or normally distributed if it has PDF of the form: where μ and σ are two scalar parameters characterising the PDF (abbreviated N(μ, σ2), and referred to as normal density function), with σ assumed positive.

slide-41
SLIDE 41

CIC

41

Normal Normal Random Random Variables Variables

 It can be verified that the normalisation property

holds:

N(1,1)

slide-42
SLIDE 42

CIC

42

Normal Normal Random Random Variables Variables

 If X is N(μ, σ2), then: E(X) = μ

Proof: The PDF is symmetric about x = μ.

 If X is N(μ, σ2), then: Var(X) = σ2

Proof:

slide-43
SLIDE 43

CIC

43

Normal Normal Random Random Variables Variables

 Its maximum value occurs at the mean value of its

argument.

 It is symmetrical about the mean value.  The points of maximum absolute slope occur at one

standard deviation above and below the mean.

 Its maximum value is inversely proportional to its

standard deviation.

 The limit as the standard deviation approaches zero

is a unit impulse.

slide-44
SLIDE 44

CIC

44

Normal Normal Random Random Variables Variables

slide-45
SLIDE 45

CIC

45

Linear F Linear Function of a N unction of a Normal

  • rmal

Random Random Variable Variable

 If X is a normal r.v. with mean  and variance  2,

and if a  0, b are scalars, then the random variable: Y = aX + b is also normal, with mean and variance: E[Y] = a + b, var(Y) = a2 2

slide-46
SLIDE 46

CIC

46

Standard Normal Standard Normal Random Random Variables Variables

 A normal random variable Y with zero mean and

unit variance, N(0, 1), is said to be a standard

  • normal. Its PDF and CDF are denoted by  and ,

respectively:

slide-47
SLIDE 47

CIC

47

Standard Normal Standard Normal Random Random Variables Variables

 The PDF of a normal r.v. cannot be integrated in

terms of the common elementary functions, and therefore the probabilities of X falling in various intervals are obtained from tables or by computer.

 Example, the Standard Normal Table.  The table only provides the values of (y) for y  0,

because the omitted values can be calculated using the symmetry of the PDF.

slide-48
SLIDE 48

CIC

48

Standard Normal Standard Normal Random Random Variables Variables

slide-49
SLIDE 49

CIC

49

Standard Normal Standard Normal Random Random Variables Variables

slide-50
SLIDE 50

CIC

50

Standard Normal Standard Normal Random Random Variables Variables

 It would be overwhelming to construct tables for all

μ and σ values required in application.

  • Standardise the r.v.

 Let X be a normal (Gaussian) random variable with

mean μ and variance σ 2 values. We standardise X by defining a new random variable Y given by:

slide-51
SLIDE 51

CIC

51

Standard Normal Standard Normal Random Random Variables Variables

 Since Y is a linear function of X, it is normal, This

means:

 Thus, Y is a standard normal random variable.

  • This allows us to calculate the probability of any event

defined in terms of X by redefining the event in terms of Y, and then using the standard normal table.

slide-52
SLIDE 52

CIC

52

Standard Normal Standard Normal Random Random Variables Variables

 Example 1:

slide-53
SLIDE 53

CIC

53

Standard Normal Standard Normal Random Random Variables Variables

 Example 2: The annual snowfall at a particular

geographic location is modelled as a normal random variable with a mean  = 60 inches and a standard deviation of  = 20. What is the probability that this year’s snowfall will be at least 80 inches?

slide-54
SLIDE 54

CIC

54

Standard Normal Standard Normal Random Random Variables Variables

 Solution:

slide-55
SLIDE 55

CIC

55

Standard Normal Standard Normal Random Random Variables Variables

 Example 3: (Height Distribution of Men). Assume

that the height X, in inches, of a randomly selected man in a certain population is normally distributed with μ = 69 and σ = 2.6. Find

  • 1. P(X < 72),
  • 2. P(X > 72),
  • 3. P(X < 66),
  • 4. P(|X − μ| < 3).
slide-56
SLIDE 56

CIC

56

Standard Normal Standard Normal Random Random Variables Variables

 The table gives (z) only for z ≥ 0, and for z < 0 we

need to make use of the symmetry of the normal

  • distribution. This implies that, for any z, P(Z < −z) =

P(Z > z). Thus, solution:

slide-57
SLIDE 57

CIC

57

Standard Normal Standard Normal Random Random Variables Variables

slide-58
SLIDE 58

CIC

58

Standard Normal Standard Normal Random Random Variables Variables

 Normal r.v.s. are often used in signal processing and

communications engineering to model noise and unpredictable distortions of signals.

 Example:

slide-59
SLIDE 59

CIC

59

Standard Normal Standard Normal Random Random Variables Variables

slide-60
SLIDE 60

CIC

60

Standard Normal Standard Normal Random Random Variables Variables

 Solution:

slide-61
SLIDE 61

CIC

61

Standard Normal Standard Normal Random Random Variables Variables

 Three important benchmarks for the Normal

distribution are the probabilities of falling within

  • ne, two, and three standard deviations of the mean.

The 68-95-99.7% rule tells us that these probabilities are what the name suggests.

 (68-95-99.7% rule). If X  N(μ, 2), then:

Standardising

slide-62
SLIDE 62

CIC

62

Standard Normal Standard Normal Random Random Variables Variables

 Three important benchmarks for the Normal

distribution are the probabilities of falling within

  • ne, two, and three standard deviations of the mean.

The 68-95-99.7% rule tells us that these probabilities are what the name suggests.

 (68-95-99.7% rule). If X  N(μ, 2), then:

Standardising

slide-63
SLIDE 63

CIC

63

Joint PDF Joint PDF of Multiple

  • f Multiple Random

Random Variables Variables

 Two continuous random variables associated with

the same experiment are jointly continuous and can be described in terms of a joint PDF fX,Y if fX,Y is a nonnegative function that satisfies: for every subset B of the two-dimensional plane.

 The notation means that the integration is carried out

  • ver the set B.
slide-64
SLIDE 64

CIC

64

Joint PDF Joint PDF of Multiple

  • f Multiple Random

Random Variables Variables

 In the particular case where B is a rectangle of the

form B = {(x, y) | a  x  b, c  y  d}, we have:

 If B is the entire two-dimensional plane, then we

  • btain the normalisation property:
slide-65
SLIDE 65

CIC

65

Joint PDF Joint PDF of Multiple

  • f Multiple Random

Random Variables Variables

 To interpret the joint PDF, we let  be a small

positive number and consider the probability of a small rectangle. Then we have: so we can view fX,Y(a, c) as the probability per unit area in the vicinity of (a, c).

slide-66
SLIDE 66

CIC

66

Joint PDF Joint PDF of Multiple

  • f Multiple Random

Random Variables Variables

slide-67
SLIDE 67

CIC

67

Joint PDF Joint PDF of Multiple

  • f Multiple Random

Random Variables Variables

 The joint PDF contains all relevant probabilistic

information on the random variables X, Y, and their dependencies.

 Therefore, the joint PDF allow us to calculate the

probability of any event that can be defined in terms

  • f these two random variables.
slide-68
SLIDE 68

CIC

68

Marginals Marginals

 Marginal PDF. For continuous r.v.s X and Y with

joint PDF fX,Y, the marginal PDF of X is:

 Similarly, the marginal PDF of Y is:

slide-69
SLIDE 69

CIC

69

Marginals Marginals

 Marginalisation works analogously with any number

  • f variables. For example, if we have the joint PDF
  • f X, Y, Z,W but want the joint PDF of X,W, we

just have to integrate over all possible values of Y and Z:

  • Conceptually this is very easy—just integrate over the unwanted

variables to get the joint PDF of the wanted variables—but computing the integral may or may not be difficult.

slide-70
SLIDE 70

CIC

70

Marginals Marginals

 Example 1.

slide-71
SLIDE 71

CIC

71

Marginals Marginals

 Example 1.

slide-72
SLIDE 72

CIC

72

Joint CDFs Joint CDFs

 If X and Y are two random variables associated with

the same experiment, their joint CDF is defined by:

 If X and Y are described by a joint PDF fX,Y, then:

slide-73
SLIDE 73

CIC

73

Joint PDF Joint PDF of Multiple

  • f Multiple Random

Random Variables Variables

 Conversely, if X and Y are continuous with joint

CDF FX,Y their joint PDF is the derivative of the joint CDF with respect to x and y:

slide-74
SLIDE 74

CIC

74

Joint CDF Joint CDF of Multiple Random

  • f Multiple Random

Variables Variables

 Let X and Y be described by a uniform PDF on the

unit square. The joint CDF is given by:

 It can be verified that:

for al (x, y) in the unit square.

slide-75
SLIDE 75

CIC

75

Expectation Expectation

 If X and Y are jointly continuous random variables

and ɡ is some function, then Z = ɡ (X, Y) is also a random variable. Thus the expected value rule applies:

 As an important special case, for any scalars a, b,

and c, we have:

slide-76
SLIDE 76

CIC

76

More than Two Random More than Two Random Variables Variables

 The joint PDF of three random variables X, Y, and Z

is defined in analogy with the case of two random

  • variables. For example:

 For any set B. We have the relations such as:

slide-77
SLIDE 77

CIC

77

More than Two Random More than Two Random Variables Variables

 The expected value rule takes the form:  If ɡ is linear, of the form aX +bY + cZ, then: