Stat 225 Week 1, 8/20/12 - 8/24/12, Notes: Set Theory

15
Stat 225 Week 1, 8/20/12 - 8/24/12, Notes: Set Theory The Fall 2012 Stat 225 T.A.s September 7, 2012 The material in this handout is intended to cover general set theory top- ics. Information includes (but is not limited to) introductory probabilities, outcome spaces, sample spaces, laws of probability, and Venn Diagrams. This covers 4.1 through 4.4 in Statistics for Business and Economics . For an ad- ditional reference, one might consult A Course in Probability by Neil Weiss, specifically 1.2 and all of chapter 2. 1 Monday, August 20th Material An element is a single item (outcome), typically denoted by ω. A set is a collection of elements. A subset is a set itself, in which every element is contained in a larger set. Suppose the set A is contained in the set B. This is denoted by A B or A B depending on whether or not B has elements which are not in A. If B contains elements that are not in A, then A is called a proper subset of B. A Population is the collection of all individuals or items under consideration. An individual could refer to a person, a playing card, or whatever object we are interested in. A population is used in reference to sampling. However, when we talk about experiments, we use the phrase sample space. Sample space is the set of all possible outcomes for a random experiment and is denoted by Ω. For example, suppose we are interested in whether the price of the S & P 500 decreases, stays the same, or increases. In this scenario Ω = {decreases, stays the same, increases}. The opposite of Ω is the empty (null) set. It is the set with 0 elements in it and is written as . Ω and are complements. A complement is a set that contains all of the elements in the population that are not in the original set. We denote a complement with a superscript c (or C). For example, the complement of A would be denoted as A c or A C . Sometimes the symbol \ is useful when writing complements. The symbol \ means ”except” or ”everything but”. 1

Transcript of Stat 225 Week 1, 8/20/12 - 8/24/12, Notes: Set Theory

Stat 225 Week 1, 8/20/12 - 8/24/12, Notes:Set Theory

The Fall 2012 Stat 225 T.A.s

September 7, 2012

The material in this handout is intended to cover general set theory top-ics. Information includes (but is not limited to) introductory probabilities,outcome spaces, sample spaces, laws of probability, and Venn Diagrams. Thiscovers 4.1 through 4.4 in Statistics for Business and Economics. For an ad-ditional reference, one might consult A Course in Probability by Neil Weiss,specifically 1.2 and all of chapter 2.

1 Monday, August 20th Material

An element is a single item (outcome), typically denoted by ω. A set isa collection of elements. A subset is a set itself, in which every element iscontained in a larger set. Suppose the set A is contained in the set B. Thisis denoted by A ⊂ B or A ⊆ B depending on whether or not B has elementswhich are not in A. If B contains elements that are not in A, then A is calleda proper subset of B. A Population is the collection of all individuals or itemsunder consideration. An individual could refer to a person, a playing card,or whatever object we are interested in. A population is used in referenceto sampling. However, when we talk about experiments, we use the phrasesample space. Sample space is the set of all possible outcomes for a randomexperiment and is denoted by Ω. For example, suppose we are interested inwhether the price of the S & P 500 decreases, stays the same, or increases.In this scenario Ω = decreases, stays the same, increases. The opposite ofΩ is the empty (null) set. It is the set with 0 elements in it and is writtenas ∅. Ω and ∅ are complements. A complement is a set that contains all ofthe elements in the population that are not in the original set. We denotea complement with a superscript c (or C). For example, the complement ofA would be denoted as Ac or AC . Sometimes the symbol \ is useful whenwriting complements. The symbol \ means ”except” or ”everything but”.

1

Suppose we look at the outcome of 2 rolls of a die. Let A be the event thatboth rolls are a 5. Then AC = Ω \ 5, 5. We use the symbol ∈ to denote”belongs to”. Here is the symbol for ”does not belong to”: 6∈. What wouldΩ be if we were to examine the change in the S & P 500 over the past twodays?

Here are some important sets that pertain to numbers: the real numbersR , the integers Z, the rational numbers Q, the natural (whole) numbers N,and the positive integers Z+. What sets are contained in (or are subsets of)the other sets?

Here are some brief exercises. Let us examine what happens in the flipof 3 fair coins. Fair means that the coin has the same probability of landingas a head as it does as landing as a tail. First, define Ω. Let A be the eventof exactly 2 tails. Let B be the event that the first 2 tosses are tails. Let Cbe the event that all 3 tosses are tails. Write out the possible outcomes foreach of these 3 events. We will revisit these events later on.

1.1 Example Problems

Let Ω, the universal set, be all 26 lower-case letters. Define the sets V , N ,E, and G (all of which are subsets of Ω) as follows:

• V = vowels (here, assume “y” is a vowel)

• N = letters next to a vowel (in the natural sequence “a” - “z”)

• E = every other letter, starting with “b”

• G = letters “a” - “g”

2

List the letters in each of the following sets:

1. V , N , E, and G individually

2. NC

3. GC

Start with a standard deck of 52 cards and remove all the hearts and allthe spades, leaving 13 red and 13 black cards. List the cards in each of thefollowing sets:

1. N = not a face card

2. R = neither red nor an ace

3. E = either black, even, or a Jack

Suppose a fair six-sided die is rolled twice. Determine the number ofpossible outcomes...

1. for this experiement.

2. in which the sum of the two rolls is 5.

3. in which the two rolls are the same

4. in which the sum of the two rolls is an even number

Random Experiment is an action whose outcome cannot be predictedwith certainty beforehand. This does not mean that we know nothing aboutwhat can happen. An example of a random experiment could be one roll ofa die (or multiple rolls), a hand in Texas Hold ’em, or a grade in a course. Ωrepresents all possible outcomes from the random experiment or the modelunder consideration. An event is defined to be any subset of the sample space.It can be one or more outcomes. Typically, when we refer to an event that isa single outcome, it is called a simple event, and subsequently, a simple prob-ability. For an example, you could think of an event as not losing money onthe S & P 500 on a given day. This event has 2 outcomes based on our priorexample where Ω = decreases, stays the same, increases. Instead, supposeyou looked at 2 consecutive days for this index. Let A be the event that youmade money on the first day. Let B be the event that you had at least oneday where you made money. How many outcomes does each event represent?

3

The Frequentist Interpretation of Probability states that the prob-ability of an event is the long-run proportion of times that the event occursin independent repetitions of the random experiment. This is referred to asan empirical probability and can be written as

P (E) =N(E)

n

where n represents the sample size. (For definitions of P(E) and N(E) seethe symbols reference.) Long-run means that n is large. There are differingviewpoints on large (typical examples are > 100, > 1,000, > 1,000,000, etc.)We will not use this exact formula for now, but it is essential to the CentralLimit Theorem (CLT), which will be covered in MGMT 305. However, theconcept is applicable for our purposes. Regardless of the sample size, if weare in an EQUALLY LIKELY FRAMEWORK, then

P (E) =N(E)

N(Ω).

What is meant by an equally likely framework? Well, let us create a sce-nario that has such a property. Suppose we roll a fair, 6-sided die. Becausethe die is fair, each side of the die has the same probability of occurring asany other side of the die. Therefore, any individual outcome of the samplespace is equally likely as any other outcome in the sample space. Often,the equal-likelihood model is referred to as classical probability. So, in anequally likely framework, the probability of any event is the number of waysthe event occurs divided by the number of total events possible. Find theprobabilities associated with parts 2-4 of the fair die example above.

1.2 Probability Rules

Regardless of whether sample outcomes have the same probabilities, there arerules that probabilities must satisfy. Any probability must be between 0 and1 inclusive. Additionally, the sum of the probabilities for all the experimentaloutcomes must equal 1. If a probability model satisfies these 2 rules, it is saidto be legitimate. Suppose the event E is composed of several outcomes. Thenthe probability of E is just the sum of the probabilities of those outcomes.Refer to event B in the coin flip example above for this calculation. Whatis the probability of Ω, ∅? If A ⊂ B, what (if anything) can you say abouttheir probabilities?

4

1.3 More Example Problems

(ASW Chapter 4.1, Problem 6) An experiment with three outcomes has beenrepeated 50 times, and it was learned that E1 occurred 20 times, E2 occurred13 times, and E3 occurred 17 times. Assign probabilities to the outcomes.What method did you use?

Start with a standard deck of 52 cards and remove all the hearts and allthe spades, leaving 13 red and 13 black cards. Suppose a card is randomlydrawn from the remaining cards. What are the probabilities of the followingevents?

1. N = not a face card

2. R = neither red nor an ace

3. E = either black, even, or a Jack

(ASW Chapter 4.1, Problem 7) A decision maker subjectively assignedthe following probabilities to the four outcomes of an experiment: P (E1) =.10, P (E2) = .15, P (E3) = .40, and P (E4) = .20. Are these probabilityassignments valid? Explain.

2 Wednesday, August 22nd Material

The intersection of the events A and B is written as A ∩ B. For an out-come to belong to the intersection, that outcome has to be in both A and B.If we were talking about the intersection of 3 or more events, the outcomewould need to be in all of them. The intersection is what is in common. Theunion of the events A and B is written as A ∪ B and it means whatever isin at least one of A or B. Please note that we do not double count. If anoutcome was in both A and B, then it is in their union, but it is not in theretwice. Refer to example where we flipped 3 fair coins: What are A ∩ B, A∪ C, and A ∩ B ∪ C?

Two other useful terms are mutually exclusive and exhaustive. Mutuallyexclusive refers to two (or more) events that cannot both occur when therandom experiment is formed. Can you think of an event that is mutually

5

exclusive with event C above? Note that the term disjoint is the same asmutually exclusive except that it refers to sets and not events. One can sym-bolically denote mutually exclusive events by the following equation: A ∩ B= ∅. Exhaustive refers to event(s) that comprise the sample space. In otherwords, events that are exhaustive have a union that equals the sample space;if A and B are exhaustive, then A ∪ B = Ω. What would you call eventsthat are both mutually exclusive and exhaustive? The answer is a partition.What is the simplest partition?

Venn Diagrams are useful tools for examining the relationships betweenevents. Tree diagrams are also helpful (more on this when we come to condi-tional probability, general multiplication rule, etc.) Draw generic diagramsfor events that are: mutually exclusive, exhaustive, complements, subsets,and have an intersection but are not subsets.

The complement rule is a way to calculate a probability based on the

probability of its complement. It is P(A) = 1 - P(AC). This law is extremelyuseful. It is often handy in situations where the desired event has many out-comes, but its complement has only a few. For example, suppose we rolled afair, six-sided die 10 times. Let T be the event that we roll at least 1 three.If one were to calculate T you would need to find the probability of 1 three,2 threes, ... , and 10 threes and add them all up. However, you can use thecomplement rule. What is P(T)?

The general addition rule is a way of finding the probability of a union of2 events. P(A ∪ B) = P(A) + P(B) - P(A ∩ B). What does this become ifA and B are mutually exclusive? Can you provide a mathematical proof ofthis? The inclusion-exclusion principle is a way to extend the general addi-tion rule to 3 or more events. Here we will limit it to 3 events. P(A ∪ B ∪C) = P(A) + P(B) + P(C) - P(A ∩ B) - P(A ∩ C) - P(B ∩ C) + P(A ∩ B∩ C).

6

2.1 Venn Diagram Problems

Three of the major commercial computer operating systems are Windows,Mac OS, and Red Hat Linux Enterprise. A Computer Science professorselects 50 of her students and asks which of these three operating systemsthey use. The results for the 50 students are summarized below.

• 30 students use Windows

• 16 students use at least two of the operating systems

• 9 students use all three operating systems

• 18 students use Mac OS

• 46 students use at least one of the operating systems

• 11 students use both Windows and Linux

• 11 students use both Windows and Mac OS

Use the above information to complete a three-way Venn diagram.

Windows

Mac OS Red Hat Linux Enterprise

7

Using the Venn diagram summarizing the distribution of operating systemuse previously described, calculate the following:

• Let Windows = A, Mac OS = B, and Red Hat Linux Enterprise = C

• N(Ac ∩Bc)

• P (Ac ∪Bc)

• N(A ∪B ∪ C)

Let Ω, the universal set, be all 26 lower-case letters. Define the sets V ,N , E, and G (all of which are subsets of Ω) as follows:

• V = vowels (here, assume “y” is a vowel)

• N = letters next to a vowel (in the natural sequence “a” - “z”)

• E = every other letter, starting with “b”

• G = letters “a” - “g”

Solve for the following quantities:

• P (consonant)

• P (GC)

• P (E) and P (EC)

In a certain population, 10 % of the population are rich, 5 % are famous,and 3 % are both.

• Draw a Venn Diagram for the situation described above and label allprobabilities.

• What is the probability a randomly chosen person is not rich?

• What is the probability a randomly chosen person is rich but not fa-mous?

• What is the probability a randomly chosen person is either rich orfamous?

• What is the probability a randomly chosen person is either rich orfamous but not both?

8

• What is the probability a randomly chosen person has neither wealthnor fame?

The law of partitions is a way to calculate the probability of an event.

Let A1, A2, ..., Ak form a partition of Ω. Then, for all events B, P(B) =∑k

i=1

P(Ai ∩ B). Then, there are DeMorgan’s Laws. Let A and B be subsets of Ω.Then

(A ∪B)C = AC ∩BC .

Furthermore,(A ∩B)C = AC ∪BC .

Drew is a risk taker. On any given weekend, Drew takes risks with orwithout monetary compensation. He gets paid 20 % of the time he takesrisks. The risks involved are to either drink something weird (like garlic but-ter) or do something silly (like shave his head into a mohawk). Drew getspaid and drinks something weird 16 % of the time. Drew does not get paidand drinks something weird 72 % of the time. What is the probability Drewdrinks something weird? What is the probability he does something silly?

Here are a few of the other laws. Each pair of equations refers to thedistributive, associative, and commutative laws respectively. For all of these,let A, B, and C be subsets of Ω.

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

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

A ∩B = B ∩ A

A ∪B = B ∪ A

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

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

Please be aware that the formulas just written can be extended to more than3 events (even an infinite number of events).

9

3 Friday, August 24th Material

Let A and B be events. The probability that event B occurs given (know-ing) that event A occurs is called a conditional probability. It is denoted asP(B | A). Whichever event is considered ”given” or ”known” goes after the| in the notation.

P (B | A) =P (B ∩ A)

P (A).

The above formula works so long as P(A) > 0. There is an equivalent to theabove formula. It is

P (B | A) =N(A ∩B)

N(A).

The idea behind conditional probability is that you have an idea of whatoccurred, but do not know exactly what happened. Meaning, you can limitthe original sample space (Ω) to something smaller. In our above example,we know that the event A occurred, so what we are doing is making A our”new” Ω. General multiplication rule is defined as

P (A ∩B) = P (A) ∗ P (B | A).

This formula is equivalent to the 2 above, just our goal is different now.Before we wanted to figure out a conditional probability, now we want toknow a joint probability, or a probability of an intersection of 2 events. Thisrule can easily be extended to more than 2 events.

P (n⋂

i=1

Ai) = P (A1)∗P (A2 | A1)∗P (A3 | A2∩A1)∗ ...∗P (An | An−1∩ ...∩A1).

Important note: A lot of the formulas in this section (4.4 of ASW) are re-arrangements of previous formulas. You use one over another depending onwhat you are given in the problem and what the goal is.

3.1 Conditional Probability Examples

Refer to the example with Drew. Find the following probabilities:

• What is the probability that Drew drinks something weird, if we knowhe was paid?

• What is the probability that Drew does something silly, if we know hewas paid?

10

• What is the probability that Drew drinks something weird, if we knowhe was not paid?

(ASW Chapter 4.4, Problem 38) A Morgan Stanley Consumer ResearchSurvey sampled men and women and asked each whether they preferred todrink plain bottled water or a sports drink such as Gatorade or Propel Fit-ness water (The Atlanta Journal-Constitution, December 28, 2005). Suppose200 men and 200 women participated in the study, and 280 reported theypreferred plain bottled water. Of the group preferring a sports drink, 80 weremen and 40 were women. Let

• M = the event the consumer is a man

• W = the event the consumer is a woman

• B = the event the consumer preferred plain bottled water

• S = the event the consumer preferred a sports drink

Answer the following:

1. What is the probability a person in the study preferred plain bottledwater?

2. What is the probability a person in the study preferred a sports drink?

3. What are the conditional probabilities P (M |S) and P (W |S)?

4. What are the joint probabilities P (M ∩ S) and P (W ∩ S)

5. Given a consumer is a man, what is the probability he will prefer asports drink?

Using the Venn Diagram summarizing the distribution of operating sys-tems previously described, calculate the following:

• The probability that a randomly chosen student uses all three operatingsystems, given the student uses Windows

• The probability that a randomly chosen student uses all three operatingsystems, given the student does not use Windows

• The probability that a randomly chosen student uses Windows, giventhe student uses Mac OS

• The probability that a randomly chosen student does not use any ofthe operating systems, given the student does not use Windows

11

Case Problem (Adapted from ASW Chapter 9, Case Problem 2, page 397)Cheating has been a concern of the dean of the College of Business at BayviewUniversity for several years. Some faculty members in the college believe thatcheating is more widespread at Bayview than at other universities, whileother faculty members think that cheating is not a major problem in thecollege. To resolve some of these issues, the dean commissioned a study toassess the current ethical behavior of the business students at Bayview. As apart of this study, an anonymous exit survey was administered to this year’sgraduating class. Responses to the following questions were used to obtaindata regarding three types of cheating. Any student who answered “Yes” toone or more of these questions was considered to have been involved in sometype of cheating.

1. During your time at Bayview, did you ever present work copied off theInternet as your own?

2. During your time at Bayview, did you ever copy answers off anotherstudent’s exam?

3. During your time at Bayview, did you ever collaborate with other stu-dents on projects that were supposed to be completed individually?

The data are represented in the following Venn diagrams below:

Copied off the Internet

Copied off an exam Collaborated on Individual projects

Copied off the Internet

Copied off an exam Collaborated on Individual projects

MALES

FEMALES

1

1

1

2 6

6 0

4

3

0

3 0

1 3

21

17

12

Copied off the Internet

Copied off an exam Collaborated on Individual projects

OVERALL

• Using the law of partitions, fill in the “Overall” Venn diagram.

• What is the probability that a randomly chosen student was involvedin some type of cheating? Use the inclusion-exclusion principle, thenthe idea of complements. Which is simpler?

• Given that a randomly chosen student cheated, what is the probabilitythat student was male?

• Given that a randomly chosen student is female, what is the probabilitythat student cheated?

• What is the probability that a randomly chosen student neither pre-sented work from the Internet nor copied answers off another student’sexam?

• What is the probability that a randomly chosen student cheated in allthree ways, given that the student copied answers off another student’sexam?

3.2 Additional Exercises

Extra 1.1 Let A be an event that happens 40% of the time. Let B be anevent that happens 75% of the time. Answer the following 4 questions. What

13

is the smallest probability the intersection of A and B can have? What isthe largest probability the intersection of A and B can have? What is thesmallest probability the union of A and B can have? What is the largestprobability the union of A and B can have? .15, .4, .75, and 1

Extra 1.2 Suppose we are rolling 2 independent, fair 10-sided die. LetA be the event that the sum of the rolls is a prime number. Let B be theevent that the sum of the rolls is odd. Let C be the event that the sum ofthe rolls is even. Find the following sets: BC , A ∩ B, A ∪ C, A ∩ C, (A ∩C)C , and A ∩ (B ∩ C)C? set C, set A except the number 2, Ω except 9 and15, just 2, Ω except 2, and Ω

Extra 1.3 Suppose a lottery has balls numbered 1-20. 4 balls are pickedat random and without replacement. Let A be the event that all 4 balls areeven. Let B be the event that all 4 balls are less than 10. Let C be the eventthat all 4 balls are primes. (Allow 1 to be a prime.) Find P(A), P(B), andP(C). (Hint an extended general multiplication rule could be helpful.) .0433,.0260, and .0260

Extra 1.4 A school has 100 students. The school offers only 3 languageclasses, namely Spanish, Italian and Russian. 50 students do not take a lan-guage. The Spanish, Italian, and Russian classes have 28, 26, and 16 studentsrespectively. However, 12 students take both Spanish and Italian, 4 studentstake both Spanish and Russian, and 6 students take both Italian and Russian.

• How many students take all 3 language classes? 2

• What is the probability a randomly chosen student takes exactly 1language class? .32

• You randomly draw 2 students. What is the probability that they aretaking at least 1 language class between them? .7525

Extra 1.5 You have eight rooks in your possession. A rook can eithermove along a row or a column, but it can make no other movement. It canmove as many as spots as it wants along the row or column of its choosing.You randomly place these eight rooks on the board, which is an 8 by 8 square.Find the probability that no rook can capture (run into with a legal move)any other rook? 9.109 * 10−6

Extra 1.6 You roll 2 fair, 6-sided die. The first one is a 3. What is theprobability that the second die has a higher value? What is the probabilitythat the first die is higher? .5 and .3333

14

Extra 1.7 100,000 people are polled. They are asked whether they useFacebook, Twitter, and Myspace. 10,000 use Twitter; 30,000 use Facebook;5,000 use Myspace; 8,000 use Twitter and Facebook; 2,000 use Twitter andMyspace; 4,000 use Facebook and Myspace; and 1,000 use all 3. What per-cent of the people polled do not use any of the 3 networking tools? Knowingthat a person uses at least one of the networking tools, what is the proba-bility that they use Twitter? Knowing that they use Twitter and Facebook,what is the probability that they do not also use Myspace? 68%, .3125, .875

Extra 1.8 Suppose on a Friday night Jake has the options of going tothe bar or going to Karen’s apartment. He goes to the bar with a probabilityof .7. If he goes to the bar he can end up in jail, a friend’s place, or back athome with probabilities of .1, .2, and .7 respectively. If he goes to Karen’s, hewill either stay or go back home. He stays with a probability of .2. Use thelaw of partitions (combined with the general multiplication rule) to find theprobability that Jake is at home on Saturday morning. Find the probabilityhe went to Karen’s given that he is not home. .73 and .2222

15