Skip to content

Commit

Permalink
Merge commit '385e9a1f63928f0782c257ff2d08ec9b5a847f87'
Browse files Browse the repository at this point in the history
* commit '385e9a1f63928f0782c257ff2d08ec9b5a847f87':
  fix homework 2 slide 12 question - typo with parens and s/100/10
  fix homework 2 slide 8 typo.  lower.tail=TRUE changed to FALSE
  fixed homework 1 question 1 - another problem
  fix homework 1 question 1, which basically was missing a negative sign
  • Loading branch information
rdpeng committed May 13, 2015
2 parents 5dc6a65 + 385e9a1 commit a5ca31e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions 06_StatisticalInference/homework/hw1.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@ Creating Data Products

--- &radio

Consider influenza epidemics for two parent heterosexual families. Suppose that the probability is 15% that at least one of the parents has contracted the disease. The probability that the father has contracted influenza is 6% while that the mother contracted the disease is 5%. What is the probability that both contracted influenza expressed as a whole number percentage?
Consider influenza epidemics for two parent heterosexual families. Suppose that the probability is 15% that at least one of the parents has contracted the disease. The probability that the father has contracted influenza is 10% while that the mother contracted the disease is 9%. What is the probability that both contracted influenza expressed as a whole number percentage?

1. 15%
2. 6%
3. 5%
4. _2%_
2. 10%
3. 9%
4. _4%_

*** .hint
$A = Father$, $P(A) = .06$, $B = Mother$, $P(B) = .05$
$A = Father$, $P(A) = .10$, $B = Mother$, $P(B) = .09$
$P(A\cup B) = .15$,

*** .explanation
$P(A\cup B) = P(A) + P(B) - 2 P(AB)$ thus
$$.15 = .06 + .05 - 2 P(AB)$$
$P(A\cup B) = P(A) + P(B) - P(AB)$ thus
$$.15 = .10 + .09 - P(AB)$$
```{r}
(0.15 - .06 - .05) / 2
.10 + .09 - .15
```

--- &radio
Expand Down
10 changes: 5 additions & 5 deletions 06_StatisticalInference/homework/hw2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ Let $p=.5$ and $X$ be binomial

*** .explanation

<span class="answer">`r round(pbinom(4, prob = .5, size = 6, lower.tail = TRUE) * 100, 1)`</span>
<span class="answer">`r round(pbinom(4, prob = .5, size = 6, lower.tail = FALSE) * 100, 1)`</span>

```{r}
round(pbinom(4, prob = .5, size = 6, lower.tail = TRUE) * 100, 1)
round(pbinom(4, prob = .5, size = 6, lower.tail = FALSE) * 100, 1)
```

--- &multitext
Expand Down Expand Up @@ -210,9 +210,9 @@ If you roll ten standard dice, take their average, then repeat this process over
$$Var(\bar X) = \sigma^2 /n$$

*** .explanation
The answer will be <span class="answer">`r round( mean(1 : 6 - 3.5) ^2 / 100, 3)`</span>
since the variance of the sampling distribution of the mean is $\sigma^2/12$
and the variance of a die roll is
The answer will be <span class="answer">`r round( mean( (1 : 6 - 3.5) ^2) / 10, 3)`</span>
since the variance of the sampling distribution of the mean is $\sigma^2/10$
where $\sigma^2$ is the variance of a single die roll, which is

```{r}
mean((1 : 6 - 3.5)^2)
Expand Down

0 comments on commit a5ca31e

Please sign in to comment.