• Ingen resultater fundet

Stochastic Processes - lesson 2

N/A
N/A
Info
Hent
Protected

Academic year: 2022

Del "Stochastic Processes - lesson 2"

Copied!
86
0
0

Indlæser.... (se fuldtekst nu)

Hele teksten

(1)

Stochastic Processes - lesson 2

Bo Friis Nielsen

Institute of Mathematical Modelling Technical University of Denmark 2800 Kgs. Lyngby – Denmark Email: bfn@imm.dtu.dk

(2)

Outline Outline

• Basic probability theory (from last lesson)

(3)

Outline Outline

• Basic probability theory (from last lesson)

• Random variables

(4)

Outline Outline

• Basic probability theory (from last lesson)

• Random variables

Discrete random variables

(5)

Outline Outline

• Basic probability theory (from last lesson)

• Random variables

Discrete random variables Continouos random variables

(6)

Outline Outline

• Basic probability theory (from last lesson)

• Random variables

Discrete random variables Continouos random variables

• Reading recommendations

(7)

Basic formulas in probability theory Basic formulas in probability theory

Sample value/outcome ω

Event A, B

Sample space Set of possible events

Complementary event A¯ = Ω A

Union A B The outcome is in at least

one of A and B

Joint event - intersection A B The outcome is in both A and B

Conditional event A|B The event A knowing that B has occurred

The empty or impossible event

(8)

P{Ω} = 1 P{∅} = 0

(9)

P{Ω} = 1 P{∅} = 0

P{A}¯ = 1 − P{A}

(10)

P{Ω} = 1 P{∅} = 0

P{A}¯ = 1 − P{A}

P{A ∩ B} = P {A} + P {B} − P{A ∪ B}

(11)

P{Ω} = 1 P{∅} = 0

P{A}¯ = 1 − P{A}

P{A ∩ B} = P {A} + P {B} − P{A ∪ B}

Conditional probability

(12)

P{Ω} = 1 P{∅} = 0

P{A}¯ = 1 − P{A}

P{A ∩ B} = P {A} + P {B} − P{A ∪ B}

Conditional probability

P{A|B} = P {A ∩ B} P{B}

(13)

P{Ω} = 1 P{∅} = 0

P{A}¯ = 1 − P{A}

P{A ∩ B} = P {A} + P {B} − P{A ∪ B}

Conditional probability

P{A|B} = P {A ∩ B}

P{B} ⇔ P{A} = P{A|B}P {B}

(14)

Law of total probability

iBi = Ω

(15)

Law of total probability

iBi = Ω Bi ∩ Bj = ∅ i 6= j

(16)

Law of total probability

iBi = Ω Bi ∩ Bj = ∅ i 6= j

P {A} = X

i=1

P {A|Bi}P{Bi}

(17)

Law of total probability

iBi = Ω Bi ∩ Bj = ∅ i 6= j

P {A} = X

i=1

P {A|Bi}P{Bi} Independent events

P{A ∩ B} = P{A}P {B}

(18)

Random variables

Random variables

(19)

Random variables Random variables

• Real valued function of an outcome X(ω) → R

(20)

Random variables Random variables

• Real valued function of an outcome X(ω) → R

• Characterised by cumulative distribution function

(21)

Random variables Random variables

• Real valued function of an outcome X(ω) → R

• Characterised by cumulative distribution function F(x) = P {X ≤ x}

(22)

Random variables Random variables

• Real valued function of an outcome X(ω) → R

• Characterised by cumulative distribution function F(x) = P {X ≤ x}

• Discrete random variables

(23)

Random variables Random variables

• Real valued function of an outcome X(ω) → R

• Characterised by cumulative distribution function F(x) = P {X ≤ x}

• Discrete random variables

Discrete countable sample space

(24)

Random variables Random variables

• Real valued function of an outcome X(ω) → R

• Characterised by cumulative distribution function F(x) = P {X ≤ x}

• Discrete random variables

Discrete countable sample space

• Continouos random variables

(25)

Random variables Random variables

• Real valued function of an outcome X(ω) → R

• Characterised by cumulative distribution function F(x) = P {X ≤ x}

• Discrete random variables

Discrete countable sample space

• Continouos random variables

Continouos uncountable sample space

(26)

Discrete random variables

Discrete random variables

(27)

Discrete random variables Discrete random variables

• Discrete state space

(28)

Discrete random variables Discrete random variables

• Discrete state space

Usually integer valued (can always be transformed to be integervalued)

(29)

Discrete random variables Discrete random variables

• Discrete state space

Usually integer valued (can always be transformed to be integervalued)

• Frequency/probability density function (pdf)

(30)

Discrete random variables Discrete random variables

• Discrete state space

Usually integer valued (can always be transformed to be integervalued)

• Frequency/probability density function (pdf) f(x) = P{X = x}

(31)

Discrete random variables Discrete random variables

• Discrete state space

Usually integer valued (can always be transformed to be integervalued)

• Frequency/probability density function (pdf) f(x) = P{X = x}

• Cumulative distribution function (CDF)

(32)

Discrete random variables Discrete random variables

• Discrete state space

Usually integer valued (can always be transformed to be integervalued)

• Frequency/probability density function (pdf) f(x) = P{X = x}

• Cumulative distribution function (CDF)

(33)

Example 1 Bernoulli distribution

Example 1 Bernoulli distribution

(34)

Example 1 Bernoulli distribution Example 1 Bernoulli distribution

• Simplest possible random experiment

(35)

Example 1 Bernoulli distribution Example 1 Bernoulli distribution

• Simplest possible random experiment

• Two possibilites

(36)

Example 1 Bernoulli distribution Example 1 Bernoulli distribution

• Simplest possible random experiment

• Two possibilites Accept/failure Male/female Rain/not rain

(37)

Example 1 Bernoulli distribution Example 1 Bernoulli distribution

• Simplest possible random experiment

• Two possibilites Accept/failure Male/female Rain/not rain

• One of the possibilities mapped to 1, X(failure) = 0, X(accept) = 1

(38)

Example 1 Bernoulli distribution Example 1 Bernoulli distribution

• Simplest possible random experiment

• Two possibilites Accept/failure Male/female Rain/not rain

• One of the possibilities mapped to 1, X(failure) = 0, X(accept) = 1

(39)

Example 1 Bernoulli distribution Example 1 Bernoulli distribution

• Simplest possible random experiment

• Two possibilites Accept/failure Male/female Rain/not rain

• One of the possibilities mapped to 1, X(failure) = 0, X(accept) = 1

P{accept} = P {X = 1} = f(1) = p, P{failure} = P {X = 0} = f(0) = 1 − p

(40)

Example 2 binomial distribution Example 2 binomial distribution

• Collection of independent Bernoulli experiments

(41)

Example 2 binomial distribution Example 2 binomial distribution

• Collection of independent Bernoulli experiments n identical experiments

Each with probability p for success Experiments mutually independent

(42)

Example 2 binomial distribution Example 2 binomial distribution

• Collection of independent Bernoulli experiments n identical experiments

Each with probability p for success Experiments mutually independent

• A number of practical applications

(43)

Example 2 binomial distribution Example 2 binomial distribution

• Collection of independent Bernoulli experiments n identical experiments

Each with probability p for success Experiments mutually independent

• A number of practical applications

Number of items passed in quality control Number of male locusts

Number of left turning vehicles

(44)

binomial distribution - continued binomial distribution - continued

• X The total number of successes - sequence less important

(45)

binomial distribution - continued binomial distribution - continued

• X The total number of successes - sequence less important

P{X = x}

(46)

binomial distribution - continued binomial distribution - continued

• X The total number of successes - sequence less important

P{X = x}

? Sequence FFSSSSFSS has probability (1 − p)2p4(1 − p)p2

(47)

binomial distribution - continued binomial distribution - continued

• X The total number of successes - sequence less important

P{X = x}

? Sequence FFSSSSFSS has probability (1 − p)2p4(1 − p)p2

?

n x

sequences with x successes

(48)

binomial distribution - continued binomial distribution - continued

• X The total number of successes - sequence less important

P{X = x}

? Sequence FFSSSSFSS has probability (1 − p)2p4(1 − p)p2

?

n x

sequences with x successes

? In conclusion

f(x) = P{X = x} =

n

px(1 − p)nx

(49)

binomial distribution - continued binomial distribution - continued

• X The total number of successes - sequence less important

P{X = x}

? Sequence FFSSSSFSS has probability (1 − p)2p4(1 − p)p2

?

n x

sequences with x successes

? In conclusion

f(x) = P{X = x} =

n x

px(1 − p)nx

(50)

0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18

Binomial distribution n=20 p = 0.5

’bincf.lst’

(51)

Moments - mean value

Moments - mean value

(52)

Moments - mean value Moments - mean value

• A measure for the location of the probability mass.

(53)

Moments - mean value Moments - mean value

• A measure for the location of the probability mass.

Single descriptor of the distribution.

(54)

Moments - mean value Moments - mean value

• A measure for the location of the probability mass.

Single descriptor of the distribution.

First order information

(55)

Moments - mean value Moments - mean value

• A measure for the location of the probability mass.

Single descriptor of the distribution.

First order information

The natural value to use if you want to ignore randomness

(56)

Moments - mean value Moments - mean value

• A measure for the location of the probability mass.

Single descriptor of the distribution.

First order information

The natural value to use if you want to ignore randomness

• Expected values

(57)

Moments - mean value Moments - mean value

• A measure for the location of the probability mass.

Single descriptor of the distribution.

First order information

The natural value to use if you want to ignore randomness

• Expected values

Theoretical average

(58)

• Mathematical definition of mean value

E(X) = Px=−∞ xf(x)

(59)

• Mathematical definition of mean value

E(X) = Px=−∞ xf(x)

• Properties

(60)

• Mathematical definition of mean value

E(X) = Px=−∞ xf(x)

• Properties

E(aX + b) = aE(X) + b

(61)

• Mathematical definition of mean value

E(X) = Px=−∞ xf(x)

• Properties

E(aX + b) = aE(X) + b

E(X + Y ) = E(X) + E(Y )

(62)

• Mathematical definition of mean value

E(X) = Px=−∞ xf(x)

• Properties

E(aX + b) = aE(X) + b

E(X + Y ) = E(X) + E(Y )

Example Bernoulli

? E(X) = 0 · (1 − p) + 1 · p = p

(63)

• Example binomial

E(X) = np (mean of sum of n identical distributed variables)

(64)

• Example binomial

E(X) = np (mean of sum of n identical distributed variables)

Alternatively directly from definition E(X) =

n

X

x=0

xf(x) =

n

X

x=0

x

n x

px(1 − p)nx =

(65)

• Example binomial

E(X) = np (mean of sum of n identical distributed variables)

Alternatively directly from definition E(X) =

n

X

x=0

xf(x) =

n

X

x=0

x

n x

px(1 − p)nx =

n

X

x=0

x n!

x!(n − x)!px(1−p)nx =

n

X

x=1

n!

(x − 1)!(n − x)!px(1−p)nx

(66)

• Example binomial

E(X) = np (mean of sum of n identical distributed variables)

Alternatively directly from definition E(X) =

n

X

x=0

xf(x) =

n

X

x=0

x

n x

px(1 − p)nx =

n

X

x=0

x n!

x!(n − x)!px(1−p)nx =

n

X

x=1

n!

(x − 1)!(n − x)!px(1−p)nx

n

X np (n − 1)!

− − − − px1(1−p)(n1)(x1)

(67)

• Example binomial

E(X) = np (mean of sum of n identical distributed variables)

Alternatively directly from definition E(X) =

n

X

x=0

xf(x) =

n

X

x=0

x

n x

px(1 − p)nx =

n

X

x=0

x n!

x!(n − x)!px(1−p)nx =

n

X

x=1

n!

(x − 1)!(n − x)!px(1−p)nx

n

X

x=1

np (n − 1)!

(x − 1)!((n − 1) − (x − 1))!px1(1−p)(n1)(x1)

(68)

Variance

Variance

(69)

Variance Variance

• Measures irregularity of distribution - variation

(70)

Variance Variance

• Measures irregularity of distribution - variation

• Second order information

(71)

• Mathematical definition

(72)

• Mathematical definition

V (X) = Px=−∞(x − E(X))2f(x)

(73)

• Mathematical definition

V (X) = Px=−∞(x − E(X))2f(x)

• Properties

(74)

• Mathematical definition

V (X) = Px=−∞(x − E(X))2f(x)

• Properties

V (aX + b) = a2V (X)

(75)

• Mathematical definition

V (X) = Px=−∞(x − E(X))2f(x)

• Properties

V (aX + b) = a2V (X)

V (X + Y ) = V (X) + V (Y ) if X and Y are independent

(76)

Example Bernoulli/Binomial

Example Bernoulli/Binomial

(77)

Example Bernoulli/Binomial Example Bernoulli/Binomial

• X ∈ be(p)

(78)

Example Bernoulli/Binomial Example Bernoulli/Binomial

• X ∈ be(p)

V (X) = P1x=0(x − E(X))2f(x) =

(0 − p)2(1 − p) + (1 − p)2p = p(1 − p)

(79)

Example Bernoulli/Binomial Example Bernoulli/Binomial

• X ∈ be(p)

V (X) = P1x=0(x − E(X))2f(x) =

(0 − p)2(1 − p) + (1 − p)2p = p(1 − p)

• Y ∈ B(n, p)

(80)

Example Bernoulli/Binomial Example Bernoulli/Binomial

• X ∈ be(p)

V (X) = P1x=0(x − E(X))2f(x) =

(0 − p)2(1 − p) + (1 − p)2p = p(1 − p)

• Y ∈ B(n, p)

• V (Y ) = np(1 − p)

(81)

Example 4 Poisson distribution Example 4 Poisson distribution

• Unlimited number of occurrences

(82)

Example 4 Poisson distribution Example 4 Poisson distribution

• Unlimited number of occurrences

Number of accidents during a year in a traffic crossing Number of weak points in steel plate

Number of sick days in large company Number of fish in trawl catch

(83)

Example 4 Poisson distribution Example 4 Poisson distribution

• Unlimited number of occurrences

Number of accidents during a year in a traffic crossing Number of weak points in steel plate

Number of sick days in large company Number of fish in trawl catch

• Limiting distribution for binomial distribution with n → ∞ and np = µ fixed

(84)

Example 4 Poisson distribution Example 4 Poisson distribution

• Unlimited number of occurrences

Number of accidents during a year in a traffic crossing Number of weak points in steel plate

Number of sick days in large company Number of fish in trawl catch

• Limiting distribution for binomial distribution with n → ∞ and np = µ fixed

(85)

Example 4 Poisson distribution Example 4 Poisson distribution

• Unlimited number of occurrences

Number of accidents during a year in a traffic crossing Number of weak points in steel plate

Number of sick days in large company Number of fish in trawl catch

• Limiting distribution for binomial distribution with n → ∞ and np = µ fixed

• f(x) = P{x occurrences} = µx!xeµ

(86)

Reading recommendations Reading recommendations

• Generally you should read in order to grasp concepts and get an intuitive understanding of the feel. You should be able to understand formulas to a level such that you can apply them in a proper context

for Tuesday September 5: 1.1-1.5 and 1.7

for Friday September 8 and Tuesday September 12, read Chapter 2 lightly and Chapter 3 section: 3.1-3.7. You

can skip proofs if you like.

Referencer

RELATEREDE DOKUMENTER

Video recording of number plates at the street of Åboulevard in Copenhagen was carried out for long periods in 2008/09 and 2010/11, and these number plate data is coupled to

The narrow focus on doping, that is, the use of anabolic steroids, can be challenged because it does not include other body controlling and optimising practices that

p. If policy coordination is understood as inte- grating environmental or health needs in the policy outputs of the specific sectors, EHPI represents an internalisation of

With this aim in mind, the County of Funen and the Danish Centre for Health Telematics in 2004 launched a three-year initiative in cooperation with a large number of parties in

For the author aspect, Scholia queries WDQS for the list of publications, showing the result in a table, displaying a bar chart of the number of publications per year, number of

The bottom row shows that education related differences in the mean number of hospital stays in a given year with either one of the five selected diagnoses are also large

types contains a number of entity classes derived from the data types in the Types module in the model. statics contains a number of classes derived from the Statics module in

• No or little road lighting increases the number of accidents in rural areas. • Intense road lighting increases the number of accidents in urban areas – Do people drive faster