Expected Value and Variance - Discrete Mathematics - Lecture Slides, Slides of Discrete Mathematics

During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Expected Value and Variance, Distribution of Random Variable, Set of Pairs, Real Number, Expected Value, Coin Flipping Example, Linearity of Expectation, Two Dice Sum Example, Bernoulli Trials, Notion of Functions

Typology: Slides

2012/2013

Uploaded on 04/27/2013

aslesha
aslesha 🇮🇳

4.4

(14)

160 documents

1 / 41

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSci 2011
Discrete Mathematics
Lecture 24
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29

Partial preview of the text

Download Expected Value and Variance - Discrete Mathematics - Lecture Slides and more Slides Discrete Mathematics in PDF only on Docsity!

CSci 2011

Discrete Mathematics

Lecture 24

ch 6.

Expected Value and Variance

Expected Value

The expected value of the random variable X(s) on

the sample space S is equal to

E(X) = ∑s ∈ S p(s) X(s)

Expected value of a Die

 X is the number that comes up when a die is rolled.  What is the expected value of X?  E(X) = 1/6 1 + 1/6 2 + 1/6 3 + … 1/6 6 = 21/6 = 7/

Three times coin flipping example

 X: number of heads  E(X) = 1/8 3 + 3/8 2 + 3/8 1 + 1/8 0 = 12/8 = 3/

Little More…

If X is a random variable and p(X=r) is the

probability that X=r, then

 E(X) = ∑r ∈ X(S) p(X=r) r.

What is the expected value of sum of the numbers

that appear when a pair of fair dice is rolled?

 p(X=2) = p(X=12) = 1/  p(X=3) = p(X=11) = 2/  p(X=4) = p(X=10) = 3/  p(X=5) = p(X=9) = 4/  p(X=6) = p(X=8) = 5/  p(X=7) = 6/  E(X) =

Ch. 8.

Relations

What is a relation

 Relation generalizes the notion of functions.

 Recall: A function takes EACH element from a set and maps it

to a UNIQUE element in another set  f: X → Y  ∀ x ∈ X, ∃ y such that f(x) = y

 Let A and B be sets.

A binary relation R from A to B is a subset of A × B  Recall: A x B = {(a, b) | a ∈ A, b ∈ B}  aRb: (a, b) ∈ R.

 Application

 Relational database model is based on the concept of relation.

More relation examples

Another relation example:

 Let A be the cities in the US  Let B be the states in the US  We define R to mean a is a city in state b  Thus, the following are in our relation: (Minneapolis, MN) (Philadelphia, PA) (Portland, MA) (Portland, OR) etc…

Most relations we will see deal with ordered pairs of

integers

Representing relations

CS

CS

CS

Alice

Bob

Claire

Dan

CS1901 CS2011 CS

Alice (^) X

Bob (^) X X

Claire

Dan (^) X X

We can represent

relations graphically:

We can represent relations in a table:

Not valid functions!

Relations on a set

A relation on the set A is a relation from A to

A

In other words, the domain and co-domain are

the same set

We will generally be studying relations of this

type

Relations on a set

Let A be the set { 1, 2, 3, 4 }
Which ordered pairs are in the relation
R = { ( a,b ) | a divides b }
R = {(1,1), (1,2), (1,3), (1,4), (2,2), (2,4), (3,3), (4,4)}

R 1 2 3 4

1 X X X X

2 X X

3 X

4 X

Relation properties

Six properties of relations we will study:

Reflexive

Irreflexive

Symmetric

Asymmetric

Antisymmetric

Transitive

Reflexivity vs. Irreflexivity

Reflexivity

 Definition: A relation is reflexive if ( a , a ) ∈ R for all aA

Irreflexivity

 Definition: A relation is irreflexive if ( a , a ) ∉ R for all aA

Examples

 Is the “divides” relation on Z +^ reflexive?  Is the “” (not ⊆) relation on a P(A) irreflexive?

irreflexive x o o x x

reflexive o x x o o

= < > ≤^ ≥

Symmetry, Asymmetry, Antisymmetry

A relation is symmetric if

 for all a, b ∈ A, ( a , b ) ∈ R ⇒ ( b , a ) ∈ R

A relation is asymmetric if

 for all a, b ∈ A, ( a , b ) ∈ R ⇒ ( b,a ) ∉ R

A relation is antisymmetric if

 for all a, b ∈ A, (( a , b ) ∈ R ∧ ( b,a ) ∈ R)a = b  (Second definition) for all a, b ∈ A, (( a , b ) ∈ Rab ) ⇒ ( b,a ) ∉ R )

antisymmetric o o o o o x

asymmetric o o x x x x

symmetric x x o x x o

< > = ≤ ≥ isTwinOf

Notes on *symmetric relations

A relation can be neither symmetric or

asymmetric

R = { (a,b) | a=|b| }

This is not symmetric

-4 is not related to itself

This is not asymmetric

4 is related to itself

Note that it is antisymmetric