131
ECE302 – Probability and Applications Tutorial #1 Reza Rafie [email protected]

ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

ECE302 – Probability and ApplicationsTutorial #1

Reza Rafie

[email protected]

Page 2: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Administrivia

Reza RafiePhD Student in Communications

1

Page 3: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Administrivia

• Starting from today, you have an assignment at theend of the tutorial. You have assignments everyother week.

• Starting from next week, you have a quiz at the endof the tutorial. You have quizzes every other week.

• If you have not yet, check the course information onblackboard for information about quizzes andassignments.

2

Page 4: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Administrivia

• Starting from today, you have an assignment at theend of the tutorial. You have assignments everyother week.

• Starting from next week, you have a quiz at the endof the tutorial. You have quizzes every other week.

• If you have not yet, check the course information onblackboard for information about quizzes andassignments.

2

Page 5: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Administrivia

• Starting from today, you have an assignment at theend of the tutorial. You have assignments everyother week.

• Starting from next week, you have a quiz at the endof the tutorial. You have quizzes every other week.

• If you have not yet, check the course information onblackboard for information about quizzes andassignments.

2

Page 6: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Administrivia

• An unexplained missed quiz or assignment willcount as a zero towards your final mark. You musttake all assignments and quizzes.

• If you are unable to attend a tutorial, ask for yourprofessor’s permission.

3

Page 7: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Administrivia

• An unexplained missed quiz or assignment willcount as a zero towards your final mark. You musttake all assignments and quizzes.

• If you are unable to attend a tutorial, ask for yourprofessor’s permission.

3

Page 8: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Illustrating randomness and the role of probabilitytheory in our lives

A student lives in Mississauga and during the term leavesan hour before her first class of the day. However, duringthe exam period she leaves an hour and 15 mins beforeher first exam of the day. Why (think probability of beinglate)?

The probability of being late is a “decreasing”function of the amount of time she allots for commuting.

4

Page 9: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Illustrating randomness and the role of probabilitytheory in our lives

The probability of being late is a “decreasing” function ofthe amount of time she allots for commuting.

4

Page 10: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Illustrating randomness and the role of probabilitytheory in our lives

Climate change has meant that the planet is gettingwarmer, but we’ve had a crazy cold summer. Does thismean climate change is a hoax?

Uh, no! While the meanor average temperature has gone up, there’s alsoincreasing variation in the weather!

5

Page 11: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Illustrating randomness and the role of probabilitytheory in our lives

Uh, no! While the mean or average temperature has goneup, there’s also increasing variation in the weather!

5

Page 12: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Illustrating randomness and the role of probabilitytheory in our lives

Sports analytics is a growing business: before signing aplayer (with millions at stake) teams must predict how aparticular player will perform. How do they do that? Isthe player’s past performance enough?

Clearly not (else,we will still be trying to sign Michael Jordan, not StephCurry).

6

Page 13: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Illustrating randomness and the role of probabilitytheory in our lives

Clearly not (else, we will still be trying to sign MichaelJordan, not Steph Curry).

6

Page 14: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Illustrating randomness and the role of probabilitytheory in our lives

Communications depends heavily on probability theory:think of a cellphone voice call. What is being said israndom. Where the call is made from is random (thesystem does not control where you are when you placethe call). Importantly, the signal must travel from the cellphone to a basestation—loss in power due to buildings,trees and other obstacles between the cellphone andbasestation is random (in fact, it is largely because ofthis random loss in power that data rates for cellphonesare much lower than for a wired connection).

7

Page 15: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

Consider the following three random experiments:Experiment 1: Toss a coin.Experiment 2: Toss a die.Experiment 3: Select a ball at random from an urncontaining balls numbered 0 to 9.

8

Page 16: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

(a) Specify the sample space of each experiment.

9

Page 17: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

Each random experience has an unpredictable outcome.

Possible outcomes of rolling a coin are:

B and Z

10

Page 18: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

Each random experience has an unpredictable outcome.Possible outcomes of rolling a coin are:

B and Z

10

Page 19: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

Each random experience has an unpredictable outcome.Possible outcomes of rolling a coin are:

B

and Z

10

Page 20: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

Each random experience has an unpredictable outcome.Possible outcomes of rolling a coin are:

B and Z

10

Page 21: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

The set of all possible outcomes is called the samplespace.

The sample space of rolling a coin is:

S1 =

B , Z

11

Page 22: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

The set of all possible outcomes is called the samplespace. The sample space of rolling a coin is:

S1 =

B , Z

11

Page 23: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

The sample space of rolling a dice is:

S2 ={

, , , , ,

}

12

Page 24: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

The sample space for experiment 3 is:

S3 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}

13

Page 25: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

(b) Find the relative frequency of each outcome in eachof the above experiments in a large number ofrepetitions of the experiment. Explain your answer.

14

Page 26: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

Suppose that a discrete experiment is repeated n timesunder identical conditions. If we show the number ofoccurrences of the ith outcome by Ni(n), the relativefrequency of the outcome is defined by

fi(n) =Ni(n)n

15

Page 27: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

For rolling a coin: fh(n) ≈ 0.5 and ft(n) ≈ 0.5.

For rolling adice: fi(n) ≈ 1

6 , for i ∈ {1, 2, . . . , 6}. For Experiment 3:fi(n) ≈ 1

10 , for i ∈ {0, 1, 2, . . . , 9}. Note that for all of theseexperiments we assumed a uniform distribution over allpossible outcomes, that is, the coin is unbiased, the diceis fair, and all of the balls in the urn are identical.

16

Page 28: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

For rolling a coin: fh(n) ≈ 0.5 and ft(n) ≈ 0.5. For rolling adice: fi(n) ≈ 1

6 , for i ∈ {1, 2, . . . , 6}.

For Experiment 3:fi(n) ≈ 1

10 , for i ∈ {0, 1, 2, . . . , 9}. Note that for all of theseexperiments we assumed a uniform distribution over allpossible outcomes, that is, the coin is unbiased, the diceis fair, and all of the balls in the urn are identical.

16

Page 29: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

For rolling a coin: fh(n) ≈ 0.5 and ft(n) ≈ 0.5. For rolling adice: fi(n) ≈ 1

6 , for i ∈ {1, 2, . . . , 6}. For Experiment 3:fi(n) ≈ 1

10 , for i ∈ {0, 1, 2, . . . , 9}.

Note that for all of theseexperiments we assumed a uniform distribution over allpossible outcomes, that is, the coin is unbiased, the diceis fair, and all of the balls in the urn are identical.

16

Page 30: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 1.1

For rolling a coin: fh(n) ≈ 0.5 and ft(n) ≈ 0.5. For rolling adice: fi(n) ≈ 1

6 , for i ∈ {1, 2, . . . , 6}. For Experiment 3:fi(n) ≈ 1

10 , for i ∈ {0, 1, 2, . . . , 9}. Note that for all of theseexperiments we assumed a uniform distribution over allpossible outcomes, that is, the coin is unbiased, the diceis fair, and all of the balls in the urn are identical.

16

Page 31: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

A dice is tossed twice and the number of dots facing upin each toss is counted and noted in the order ofoccurrence.(a) Find the sample space.

17

Page 32: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

What are the possible outcomes?

...

18

Page 33: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

What are the possible outcomes?

...

18

Page 34: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

What are the possible outcomes?

...

18

Page 35: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

What are the possible outcomes?

...

18

Page 36: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

What are the possible outcomes?

...

18

Page 37: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

The sample space is

S = {11, 12, 13, . . . , 16, 21, 22, . . . , 66}

1st

2nd

19

Page 38: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

The sample space is

S = {11, 12, 13, . . . , 16, 21, 22, . . . , 66}

|S| =?

1st

2nd

19

Page 39: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

The sample space is

S = {11, 12, 13, . . . , 16, 21, 22, . . . , 66}

|S| = 36

1st

2nd

19

Page 40: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

The sample space is

S = {11, 12, 13, . . . , 16, 21, 22, . . . , 66}

1st

2nd

19

Page 41: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

(b) Find the set A corresponding to the event “number ofdots in first toss is not less than number of dots insecond toss.”

20

Page 42: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

Events are some subsets of the sample space that wewould like to assign them a probability.

21

Page 43: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

• Every event is a subset of the sample space.

• Not all of the subsets are necessarily events (we talkmore about it later in the course).

Fact:In this course, if the sample space is discrete, then allof the subsets of the sample space are usually events!

22

Page 44: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

• Every event is a subset of the sample space.• Not all of the subsets are necessarily events (we talkmore about it later in the course).

Fact:In this course, if the sample space is discrete, then allof the subsets of the sample space are usually events!

22

Page 45: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

• Every event is a subset of the sample space.• Not all of the subsets are necessarily events (we talkmore about it later in the course).

Fact:In this course, if the sample space is discrete, then allof the subsets of the sample space are usually events!

22

Page 46: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

1st

2nd

23

Page 47: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

1st

2nd

23

Page 48: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

1st

2nd

23

Page 49: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

A = {11, 21, 22, 31, 32, 33, 41, . . . , 65, 66}

|A| = 21

24

Page 50: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

A = {11, 21, 22, 31, 32, 33, 41, . . . , 65, 66}

|A| =

21

24

Page 51: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

A = {11, 21, 22, 31, 32, 33, 41, . . . , 65, 66}

|A| = 21

24

Page 52: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

(c) Find the set B corresponding to the event “number ofdots in first toss is 6.”

25

Page 53: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

1st

2nd

26

Page 54: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

1st

2nd

26

Page 55: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

1st

2nd

26

Page 56: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

B = {61, 62, 63, 64, 65, 66}

|B| = 6

27

Page 57: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

B = {61, 62, 63, 64, 65, 66}

|B| =

6

27

Page 58: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

B = {61, 62, 63, 64, 65, 66}

|B| = 6

27

Page 59: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

(d) Does A imply B or does B imply A?

28

Page 60: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

If the event B happens it means that the outcome x is inB, that is x ∈ B.

Note that, B ⊂ A =⇒ x ∈ A.So, if B occurs, A occurs too!Therefore B implies A.

29

Page 61: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

If the event B happens it means that the outcome x is inB, that is x ∈ B.Note that, B ⊂ A =⇒ x ∈ A.

So, if B occurs, A occurs too!Therefore B implies A.

29

Page 62: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

If the event B happens it means that the outcome x is inB, that is x ∈ B.Note that, B ⊂ A =⇒ x ∈ A.So, if B occurs, A occurs too!

Therefore B implies A.

29

Page 63: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

If the event B happens it means that the outcome x is inB, that is x ∈ B.Note that, B ⊂ A =⇒ x ∈ A.So, if B occurs, A occurs too!Therefore B implies A.

29

Page 64: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

(e) Find A ∩ Bc and describe this event in words.

30

Page 65: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

Bc is the complement of B.

So, A∩ Bc is the event that A occurs and B does not occur.

In wordsNumber of dots in first toss is not less than number ofdots in second toss and number of dots in first toss isnot 6.

31

Page 66: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

Bc is the complement of B.So, A∩ Bc is the event that A occurs and B does not occur.

In wordsNumber of dots in first toss is not less than number ofdots in second toss and number of dots in first toss isnot 6.

31

Page 67: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

Bc is the complement of B.So, A∩ Bc is the event that A occurs and B does not occur.

In wordsNumber of dots in first toss is not less than number ofdots in second toss and number of dots in first toss isnot 6.

31

Page 68: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

1st

2nd

32

Page 69: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

A ∩ Bc = {11, 21, 22, 31, 32, 33, 41, 42, 43, 44, 51, 52, 53, 54, 55}

33

Page 70: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

(f ) Let C corresponds to the event “number of dots indices differs by 2.” Find A ∩ C.

34

Page 71: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

A ∩ C =Number of dots in first toss is not less thannumber of dots in second toss

andnumber of dots in dices differs by 2.

A ∩ C = {31, 42, 53, 64}

35

Page 72: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.2

A ∩ C =Number of dots in first toss is not less thannumber of dots in second toss

andnumber of dots in dices differs by 2.

A ∩ C = {31, 42, 53, 64}

35

Page 73: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

A binary communication system transmits a signal X thatis either a +2 voltage signal or a −2 voltage signal. Amalicious channel reduces the magnitude of thereceived signal by the number of heads it counts in twotosses of a coin. Let Y be the resulting signal.(a) Find the sample space.

36

Page 74: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

Number of heads (N) in two tosses of a coin can be 0,1 or2.

We know that |Y| = |X| − N in which N ∈ {0, 1, 2}.If X = +2, possible outcomes are Y = +2, +1 or 0.If X = −2, possible outcomes are Y = -2, -1 or 0.Therefore, SY = {−2,−1, 0,+1,+2}.

37

Page 75: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

Number of heads (N) in two tosses of a coin can be 0,1 or2.We know that |Y| = |X| − N in which N ∈ {0, 1, 2}.

If X = +2, possible outcomes are Y = +2, +1 or 0.If X = −2, possible outcomes are Y = -2, -1 or 0.Therefore, SY = {−2,−1, 0,+1,+2}.

37

Page 76: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

Number of heads (N) in two tosses of a coin can be 0,1 or2.We know that |Y| = |X| − N in which N ∈ {0, 1, 2}.If X = +2, possible outcomes are Y = +2, +1 or 0.

If X = −2, possible outcomes are Y = -2, -1 or 0.Therefore, SY = {−2,−1, 0,+1,+2}.

37

Page 77: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

Number of heads (N) in two tosses of a coin can be 0,1 or2.We know that |Y| = |X| − N in which N ∈ {0, 1, 2}.If X = +2, possible outcomes are Y = +2, +1 or 0.If X = −2, possible outcomes are Y = -2, -1 or 0.

Therefore, SY = {−2,−1, 0,+1,+2}.

37

Page 78: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

Number of heads (N) in two tosses of a coin can be 0,1 or2.We know that |Y| = |X| − N in which N ∈ {0, 1, 2}.If X = +2, possible outcomes are Y = +2, +1 or 0.If X = −2, possible outcomes are Y = -2, -1 or 0.Therefore, SY = {−2,−1, 0,+1,+2}.

37

Page 79: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

(b) Find the set of outcomes corresponding to the event“transmitted signal was definitely +2”

38

Page 80: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

We already saw that if X = +2, possible outcomes are Y =

+2, +1 or 0.

Also, we saw that Y = 0 can happen when X = −2.Thus, as a set, the answer is {+1,+2}.

39

Page 81: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

We already saw that if X = +2, possible outcomes are Y =

+2, +1 or 0.Also, we saw that Y = 0 can happen when X = −2.

Thus, as a set, the answer is {+1,+2}.

39

Page 82: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

We already saw that if X = +2, possible outcomes are Y =

+2, +1 or 0.Also, we saw that Y = 0 can happen when X = −2.Thus, as a set, the answer is {+1,+2}.

39

Page 83: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

X = +2

X = −2

Y

+2

+1

0

−1

−2

40

Page 84: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

(c) Describe in words the event corresponding to theoutcome Y = 0

41

Page 85: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

This is the case that N = 2.

We cannot determine the input!

42

Page 86: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.4

This is the case that N = 2.We cannot determine the input!

42

Page 87: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

A desk drawer contains six pens, four of which are dry.(a) The pens are selected at random one by one until agood pen is found. The sequence of test results is noted.What is the sample space?

43

Page 88: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

The first pen is good!

Sa = {G

,DG,DDG,DDDG,DDDDG}

44

Page 89: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

The first pen is dry, the second pen is good!

Sa = {G,DG,

DDG,DDDG,DDDDG}

44

Page 90: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

We can select at most 4 dry pens!

Sa = {G,DG,DDG,DDDG,DDDDG}

44

Page 91: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

(b) Suppose that only the number, and not the sequence,of pens tested in part (a) is noted. Specify the samplespace.

45

Page 92: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

Sa = {G,DG,DDG,DDDG,DDDDG}

Sb = {1, 2, 3, 4, 5}

46

Page 93: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

Sa = {G,DG,DDG,DDDG,DDDDG}

Sb = {1, 2, 3, 4, 5}

46

Page 94: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

(c) Suppose that the pens are selected one by one andtested until both good pens have been identified, andthe sequence of test results is noted. What is the samplespace?

47

Page 95: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

Sc = {GG

,GDG,DGG,GDDG, . . . ,DDDDGG}

What is |Sc|?Hint: The last pen is always a Good one!|Sc| = 1+ 2+ 3+ 4+ 5 = 15.

48

Page 96: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

Sc = {GG,GDG

,DGG,GDDG, . . . ,DDDDGG}

What is |Sc|?Hint: The last pen is always a Good one!|Sc| = 1+ 2+ 3+ 4+ 5 = 15.

48

Page 97: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

Sc = {GG,GDG,DGG

,GDDG, . . . ,DDDDGG}

What is |Sc|?Hint: The last pen is always a Good one!|Sc| = 1+ 2+ 3+ 4+ 5 = 15.

48

Page 98: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

Sc = {GG,GDG,DGG,GDDG

, . . . ,DDDDGG}

What is |Sc|?Hint: The last pen is always a Good one!|Sc| = 1+ 2+ 3+ 4+ 5 = 15.

48

Page 99: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

Sc = {GG,GDG,DGG,GDDG, . . . ,DDDDGG}

What is |Sc|?Hint: The last pen is always a Good one!|Sc| = 1+ 2+ 3+ 4+ 5 = 15.

48

Page 100: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

Sc = {GG,GDG,DGG,GDDG, . . . ,DDDDGG}

What is |Sc|?

Hint: The last pen is always a Good one!|Sc| = 1+ 2+ 3+ 4+ 5 = 15.

48

Page 101: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

Sc = {GG,GDG,DGG,GDDG, . . . ,DDDDGG}

What is |Sc|?Hint: The last pen is always a Good one!

|Sc| = 1+ 2+ 3+ 4+ 5 = 15.

48

Page 102: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

Sc = {GG,GDG,DGG,GDDG, . . . ,DDDDGG}

What is |Sc|?Hint: The last pen is always a Good one!|Sc| = 1+ 2+ 3+ 4+ 5 = 15.

48

Page 103: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

(d) Specify the sample space in part (c) if only thenumber of pens tested is noted.

49

Page 104: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

Sc = {GG,GDG,DGG,GDDG, . . . ,DDDDGG}

Sd = {2, 3, 4, 5, 6}

What is |Sd|?

50

Page 105: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

Sc = {GG,GDG,DGG,GDDG, . . . ,DDDDGG}

Sd = {2, 3, 4, 5, 6}

What is |Sd|?

50

Page 106: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.5

Sc = {GG,GDG,DGG,GDDG, . . . ,DDDDGG}

Sd = {2, 3, 4, 5, 6}

What is |Sd|?

50

Page 107: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.9

The sample space of an experiment is the real line. Letthe events A and B correspond to the following subsetsof the real line: A = (−∞, r] and B = (−∞, s], where r ≤ s.Find an expression for the event C = (r, s] in terms of Aand B. Show that B = A ∪ C and A ∩ C = ∅.

51

Page 108: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.9

A

B

+∞−∞ r s

C = B ∩ Ac

52

Page 109: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.10

Use Venn diagrams to verify the set identities given inEqs. (2.2) and (2.3). You will need to use different colors ordifferent shadings to denote the various regions clearly.

53

Page 110: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.10

A ∪ (B ∪ C) = (A ∪ B) ∪ C

A ∩ (B ∩ C) = (A ∩ B) ∩ C

A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)

A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)

Think about it for 1 minute!

54

Page 111: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.10

A ∪ (B ∪ C) = (A ∪ B) ∪ C

A ∩ (B ∩ C) = (A ∩ B) ∩ C

A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)

A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)

Think about it for 1 minute!

54

Page 112: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.12

Show that if A ∪ B = A and A ∩ B = A then A = B

55

Page 113: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.12

To show that two sets A,B are equal A = B, we usuallyshow that:

1. A ⊂ B2. B ⊂ A

56

Page 114: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.12

To show that two sets A,B are equal A = B, we usuallyshow that:1. A ⊂ B

2. B ⊂ A

56

Page 115: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.12

To show that two sets A,B are equal A = B, we usuallyshow that:1. A ⊂ B2. B ⊂ A

56

Page 116: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.12

To show that A ⊂ B, we need to prove that for any x ∈ A,we have x ∈ B:

∀x ∈ A : A = A ∩ B =⇒ x ∈ (A ∩ B)=⇒ x ∈ B =⇒ A ⊂ B

57

Page 117: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.12

To show that A ⊂ B, we need to prove that for any x ∈ A,we have x ∈ B:

∀x ∈ A : A = A ∩ B =⇒ x ∈ (A ∩ B)=⇒ x ∈ B =⇒ A ⊂ B

57

Page 118: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.12

To show that B ⊂ A, we need to prove that for any x ∈ B,we have x ∈ A.

∀x ∈ B : x ∈ B ∪ A = A =⇒ x ∈ A=⇒ B ⊂ A

58

Page 119: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.12

To show that B ⊂ A, we need to prove that for any x ∈ B,we have x ∈ A.

∀x ∈ B : x ∈ B ∪ A = A =⇒ x ∈ A=⇒ B ⊂ A

58

Page 120: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Question 2.12

A ⊂ B and B ⊂ A =⇒ A = B

59

Page 121: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Questions?

59

Page 122: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Fun fact

We can approximate π using the concept of relativefrequency!

60

Page 123: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Fun fact

2

Sample points from the square “uniformly” at random.The relative frequency of points within the circle isapproximately π×12

22 = π/4

61

Page 124: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Fun fact

2

Sample points from the square “uniformly” at random.The relative frequency of points within the circle isapproximately π×12

22 = π/4

61

Page 125: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Fun fact

2

Sample points from the square “uniformly” at random.

The relative frequency of points within the circle isapproximately π×12

22 = π/4

61

Page 126: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Fun fact

2

Sample points from the square “uniformly” at random.The relative frequency of points within the circle isapproximately

π×1222 = π/4

61

Page 127: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Fun fact

2

Sample points from the square “uniformly” at random.The relative frequency of points within the circle isapproximately π×12

22 = π/4

61

Page 128: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Fun fact

Using Matlab after 100 iterations, sampling 10 millionpoints in each iteration:

62

Page 129: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Fun fact

i t e r a t i o n s = 100 ;pi_approx = ze ro s ( i t e r a t i o n s , 1) ;f o r k = 1 : i t e r a t i o n s

num_of_samples = 10000000;X = rand (num_of_samples , 1) ;Y = rand (num_of_samples , 1) ;d i s t = sq r t (X.^2 + Y.^2) ;num_samples_inside = nnz ( d i s t <= 1) ;pi_approx (k ) = 4 * num_samples_inside / ...

num_of_samples ;endformat longmean( pi_approx )p i

63

Page 130: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Fun fact

True value: 3.141592653589793 ...

Approximated value: 3.141594348

64

Page 131: ECE302 – Probability and Applications - Tutorial #1rrafie/ece302/Tutorial_01.pdf · 2017. 9. 21. · Administrivia •Startingfromtoday,youhaveanassignmentatthe endofthetutorial.Youhaveassignmentsevery

Fun fact

True value: 3.141592653589793 ...Approximated value: 3.141594348

64