+ All Categories
Home > Documents > Homework Assignment

Homework Assignment

Date post: 01-Jan-2016
Category:
Upload: beverly-bishop
View: 45 times
Download: 0 times
Share this document with a friend
Description:
Homework Assignment. Chapter 1, Problems 6, 15 Chapter 2, Problems 6, 8, 9, 12 Chapter 3, Problems 4, 6, 15 Chapter 4, Problem 16 Due a week from Friday: Sept. 22, 12 noon. Your TA will tell you where to hand these in. Random Sampling - what did we learn?. It’s difficult to do properly - PowerPoint PPT Presentation
96
Homework Assignment Chapter 1, Problems 6, 15 Chapter 2, Problems 6, 8, 9, 12 Chapter 3, Problems 4, 6, 15 Chapter 4, Problem 16 Due a week from Friday: Sept. 22, 12 noon. Your TA will tell you where to hand these in
Transcript

Homework Assignment

• Chapter 1, Problems 6, 15• Chapter 2, Problems 6, 8, 9, 12• Chapter 3, Problems 4, 6, 15• Chapter 4, Problem 16• Due a week from Friday:• Sept. 22, 12 noon.• Your TA will tell you where to hand these in

Random Sampling - what did we learn?

• It’s difficult to do properly• Why not just point?• Computers and random numbers• Can you tell if your numbers were random?

Sampling distribution of the mean

Sampling distribution of the mean

Sampling distribution of the mean

Sampling distribution of the mean

How confident can we be about this one estimate of the mean?

Estimating error of the mean

• Hard method: take a few MORE random samples, and get more estimates for the mean

• Easy method: use the formula:

SEY

=s

n

Confidence interval

• Confidence interval– a range of values surrounding the sample estimate that is likely to contain the population parameter

• We are 95% confident that the true mean lies in this interval

= 5.14

Y = 5.26

What if we calculate 95% confidence

intervals?• Approximately ± 2 S.E.• Expect that 95% of the intervals from the class will contain the true population mean, 5.14

• 70 invervals * 5% = 3.5• Expect that 3 or 4 will not contain the mean, and the rest will

Mean ± 95% C.I.

Mean ± 95% C.I.

What if we took larger samples? Say, n=20 instead of n=10?

Probability

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

The Birthday Challenge

Probability

• The proportion of times the event occurs if we repeat a random trial over and over again under the same conditions

• Pr[A] – The probability of event A

Two events are mutually exclusive if they cannot both be

true.

Two events are mutually exclusive if they cannot both be

true.

(cannot both occur simultaneously)

A

B

Mutually exclusive

A

B

Mutually exclusive

Venn diagram

A

B

Mutually exclusive

Venn diagram

Sample space

A

B

Mutually exclusive

Venn diagram

Sample space

Possible outcome

Pr[B] proportionalto area

Mutually exclusive

Mutually exclusive

Pr(A and B) = 0

Mutually exclusive

Visual definition - areas do not overlap in Venn diagram

Not mutually exclusive

Pr(A and B) 0

Pr(purple AND square) 0

For example

Probability distribution

A probability distribution describes the true relative

frequency of all possible values of a random variable.

Probability distribution

A probability distribution describes the true relative

frequency of all possible values of a random variable.

Random variable - a measurement that changes from one observation to the next because of chance

Probability distribution for the

outcome of a roll of a die

Number rolled

Frequency

Probability distribution for the sum of a roll of two

dice

Sum of two dice

Frequency

The addition rule

The addition principle: If two events A and B are mutually

exclusive, then

Pr[A OR B] = Pr[A] + Pr[B]

Addition Rule

Pr[1 or 2] = ?

Addition Rule

Pr[1 or 2] = Pr[1]+Pr[2]

Addition Rule

Pr[1 or 2] = Pr[1]+Pr[2]

Addition Rule

Pr[1 or 2] = Pr[1]+Pr[2]

Sum of areas

The probability of a range

For families of 8 children,

Pr[Number of boys ≥ 6] = ?

The probability of a range

For families of 8 children,

Pr[Number of boys ≥ 6] = Pr[6 or 7 or 8]

= Pr[6]+Pr[7]+Pr[8]

The probabilities of all possibilities add

to 1.

Addition Rule

Pr[1 or 2 or 3 or 4 or 5 or 6] = ?

Addition Rule

Pr[1 or 2 or 3 or 4 or 5 or 6] = 1

Probability of Not

QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.

Pr[NOT rolling a 2] = ?

Probability of Not

QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.

Pr[NOT rolling a 2] = 1 - Pr[2] = 5/6

Probability of Not

QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.

Pr[NOT rolling a 2] = 1 - Pr[2] = 5/6

Pr[not A] = 1-Pr[A]

The addition rule

The addition principle: If two events A and B are mutually

exclusive, then

Pr[A OR B] = Pr[A] + Pr[B]

The addition rule

The addition principle: If two events A and B are mutually

exclusive, then

Pr[A OR B] = Pr[A] + Pr[B]

What if they are not mutually exclusive?

General Addition Rule

A

B

Pr[A or B] = ?

General Addition Rule

A

B

Pr[A or B] = ?

AB

General Addition Rule

A

B

Pr[A or B] = ?

AB

General Addition Rule

A

B

Pr[A or B] = ?

AB

General Addition Rule

A

B

AB

General Addition Rule

General Addition RulePr[Walks or flies] = ?

General Addition RulePr[Walks or flies] = ?

General Addition RulePr[Walks or Flies] = Pr[Walks] + Pr[Flies]

- Pr[Walks and Flies]

General Addition Rule

Pr[A OR B] = Pr[A] + Pr[B] - Pr[A AND B].

Independence

Two events are independent if the occurrence of one gives

no information about whether the second will occur.

Independence

Two events are independent if the occurrence of one gives

no information about whether the second will occur.

Equivalent definition: The occurrence of one does notchange the probability that the second will occur

Multiplication rule

If two events A and B are independent, then

Pr[A and B] = Pr[A] x Pr[B]

Pr[boy]=0.512

Pr[ (first child is a boy) AND (second child is a boy)]

= 0.512 × 0.512 = 0.262.

Pr[boy]=0.512

Pr[ (first child is a boy) AND (second child is a boy)]

= 0.512 × 0.512 = 0.262.

General Addition Rule

Multiplication rule

If two events A and B are independent, then

Pr[A and B] = Pr[A] x Pr[B]

OR versus AND

• OR statements:– Involve addition– It matters if the events are mutually exclusive

• AND statements:– Involve multiplication– It matters if the events are independent

Probability trees

Sex of two children family

Sex of two children family

Dependent events

Variables are not always independent; in fact they are often not

Fig wasps

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Fig wasps

Testing independence

• Are the previous state of the fig and the sex of an egg laid independent?

• Test the multiplication rule:Pr[A and B] ?=? Pr[A] x Pr[B]Pr[fig already has eggs and male] ?=?P[fig already has eggs] x Pr[male]

Are the previous state of the fig and the sex of an egg laidindependent?

Pr(male) = 0.18 + 0.04 = 0.22

Pr(fig already has eggs) = 0.2

Pr(male AND fig already has eggs) = 0.18 ≠

Pr(male) x Pr(fig already has eggs) = 0.22 x 0.2 = 0.044

So these two events are NOT independent.

Are the previous state of the fig and the sex of an egg laidindependent?

Pr(male) = 0.18 + 0.04 = 0.22

Pr(fig already has eggs) = 0.2

Pr(male AND fig already has eggs) = 0.18 ≠

Pr(male) x Pr(fig already has eggs) = 0.22 x 0.2 = 0.044

So these two events are NOT independent.

Are the previous state of the fig and the sex of an egg laidindependent?

Pr(male) = 0.18 + 0.04 = 0.22

Pr(fig already has eggs) = 0.2

Pr(male AND fig already has eggs) = 0.18 ≠

Pr(male) x Pr(fig already has eggs) = 0.22 x 0.2 = 0.044

So these two events are NOT independent.

Are the previous state of the fig and the sex of an egg laidindependent?

Pr(male) = 0.18 + 0.04 = 0.22

Pr(fig already has eggs) = 0.2

Pr(male AND fig already has eggs) = 0.18 ≠

Pr(male) x Pr(fig already has eggs) = 0.22 x 0.2 = 0.044

So these two events are NOT independent.

Are the previous state of the fig and the sex of an egg laidindependent?

Pr(male) = 0.18 + 0.04 = 0.22

Pr(fig already has eggs) = 0.2

Pr(male AND fig already has eggs) = 0.18 ≠

Pr(male) x Pr(fig already has eggs) = 0.22 x 0.2 = 0.044

So these two events are NOT independent.

Short summary

The probability of A OR B involves addition.

P(A or B) = P(A) + P(B) if the two are mutually exclusive.

The probability of A AND B involves multiplication

P(A and B) = P(A) P(B) if the two are independent

Conditional probability

Pr[X|Y]

P(X | Y) means the probability of X if Y is true.

It is read as "the probability of X given Y."

P(female lays a male egg | fig has eggs already) = 0.9.

Pr X[ ] = Pr Y[ ]Pr X |Y[ ]All valuesof Y

Law of total probability:

The probability of a male egg is

Pr[male]=

Pr(male egg | fig has no eggs) Pr(fig has no eggs) + Pr(male egg |fig already has eggs) Pr(fig already has eggs)

= 0.05*0.8 + 0.9 (0.2) = 0.22

The general multiplication rule

Pr[A AND B] = Pr[A] Pr[B | A].

The general multiplication rule

Pr[A AND B] = Pr[A] Pr[B | A].

Does not require independence between A and B

Bayes' theorem

Pr A| B[ ] =Pr B| A[ ]Pr[A]

Pr[B]

In class exercise

Using data collected in 1975, the probabilit y of women being given

a biopsy having cervical cancer was 0.0001. The probabili ty that a

biopsy would corr ectly identify these women as having cancer was

0.90. The probabilities of a “false positive” (the test saying there

was cancer when there was not) was 0.001. What is the probabilit y

that a woman with a positive result actually has cancer?

Answer

Using data collected in 1975, the probability of women being given a biopsy havingcervical cancer was 0.0001. The probability that a biopsy would correctly identify thesewomen as having cancer was 0.90. The probabilities of a "false positi ve" (the test sayingthere was cancer when there was not) was 0.001. What is the probabilit y that a womanwith a positive result actually has cancer?

Pr[cancer | positive result] = ???

AnswerPr[cancer | positive result] = Pr[positive result | cancer] Pr[cancer]

Pr[positive result]

Pr[cancer] = 0.0001

Pr[no cancer] = 1-0.0001 = 0.9999

Pr[positive result | cancer]=0.9

Pr[positive result |no cancer] = 0.001

Pr[positive result] = ???

Answer

AnswerPr[cancer | positive result] = Pr[positive result | cancer] Pr[cancer]

Pr[positive result]

Pr[cancer] = 0.0001

Pr[no cancer] = 1-0.0001 = 0.9999

Pr[positive result | cancer]=0.9

Pr[positive result |no cancer] = 0.001

Pr[positive result] = 0.0010899

Answer

Pr[cancer | positive result] = (0.9)(0.0001) = 0.0826 0.0010899

Pr[cancer] = 0.0001

Pr[no cancer] = 1-0.0001 = 0.9999

Pr[positive result | cancer]=0.9

Pr[positive result |no cancer] = 0.001

Pr[positive result] = 0.0010899

Homework Assignment

• Chapter 1, Problems 6, 15• Chapter 2, Problems 6, 8, 9, 12• Chapter 3, Problems 4, 6, 15• Chapter 4, Problem 16• Due a week from Friday:• Sept. 22, 12 noon.• Your TA will tell you where to hand these in


Recommended