Skip to content

Commit

Permalink
update to schedule and notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickreich committed Nov 12, 2018
1 parent 5ed563d commit 882016b
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 25 deletions.
47 changes: 34 additions & 13 deletions assets/lectures/lecture8-confidence/lecture8-inference.Rnw
Expand Up @@ -86,15 +86,9 @@ Relationships are characterized by parameters in our models.

\

These are some tools we use to characterize our uncertainty about these parameters:
\bi
\myitem Likelihood
\myitem Posterior distributions
\myitem Null distributions
\myitem Sampling distributions (``classical'' approach)
\ei
e.g. in this model, $\beta_1$ characterizes an assumed relationship between FEV and height

There is no one "best" approach. Some will be right for some circumstances, not right for others. Each make different assumptions.
$$ \widehat{FEV} = \beta_0 +\beta_1\cdot height $$

\end{frame}

Expand Down Expand Up @@ -125,7 +119,24 @@ There is no one "best" approach. Some will be right for some circumstances, not
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[fragile]{Likelihood for coin-flipping}

What is the relative likelihood of each $p$ given 10 coin flips and 5 heads?

$$L(p | X=5, n=10) = {10 \choose 5}\cdot p^5 \cdot (1-p^{10-5})$$

<<echo=FALSE, fig.height=3>>=
binom_lik_scaled <- function(p, x, n) {
dbinom(x=x, size = n, prob = p)/dbinom(x=x, size=n, p=x/n)
}
par(mar=c(5, 5, 1, 1))
curve(binom_lik_scaled(x, 5, 10), xlab="p", ylab="scaled likelihood", col="blue")
@


\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[fragile]{Likelihood for coin-flipping}
Expand Down Expand Up @@ -172,23 +183,33 @@ Most (not all) statisticians use likelihood to translate data into knowledge.
A Bayesian incorporates prior belief into the likelihood. What is your prior belief about what this parameter is?

\bi
\myitem Based on prior scientific studies or observations. e.g. "The laws of physics dictate that this coin is more or less fair, so I think the probability of getting a head should be about 0.5."
\myitem Little or no knowledge can be described as having a {\color{orange}uniform prior}. In this case, Bayesian inference is equivalent to just using the likelihood.
\myitem Based on prior scientific studies or observations.

e.g.``The laws of physics dictate that this coin is more or less fair, so I think the probability of getting a head should be about 0.5." or ``Based on prior studies, there should be a positive association between height and FEV.''

\myitem Little knowledge can be described as having a {\color{orange}weakly informative prior}.

e.g. ``Based on common sense, we know that height likely has a moderate effect of FEV, but it could be positive or negative, and we don't really want to make an assumption one way or another.''

\myitem No knowledge can be described as having a {\color{orange}uniform prior}.

e.g. ``I have no idea what the relationship between FEV and height should be. it could be anywhere between $-\infty$ and $\infty$.''

\ei

\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[fragile]{Let's establish the classes prior beliefs}
\begin{frame}[fragile]{Let's establish the classes prior beliefs about this coin}

Go here to submit your guess: https://goo.gl/RKW8dJ
Go here to submit your guess: https://goo.gl/forms/bp6PE4ZHXedoJhj92

We are going to use these guesses to create a prior distribution for the collective belief in the class about this coin.

<<eval=FALSE>>=
probs <- read.csv(file="https://goo.gl/jNDbrv")
probs <- read.csv(file="https://docs.google.com/spreadsheets/d/e/2PACX-1vTd9GsPDSeBtk5Qfx-2xJ-9vSlIaOF7rNYIbVcgWVnx5UC_yoOnQRoQW6kQTMP5kMlPpNaCqrC8m1Ec/pub?gid=1602296264&single=true&output=csv")
(probs$prob)
library(MASS)
Expand Down
Binary file modified assets/lectures/lecture8-confidence/lecture8-inference.pdf
Binary file not shown.
49 changes: 42 additions & 7 deletions pages/instructor-schedule.md
Expand Up @@ -157,25 +157,60 @@ _Thurs, week 6_

_Tues, week 7_

- Bayesian coin-flipping activity
- Lecture 8: Understanding uncertainty: coin-flipping, election simulations, etc...
Project

_Thurs, week 7_

- Lecture 9: understanding uncertainty - sampling distributions, etc...
- with activities

Project

_Tues, week 8_

- lab 7 (ipod shuffle) in class
Project

_Thurs, week 8_

Project

_Tues, week 9_

Project

_Thurs, week 9_

Project

_Tues, week 10_

Project

_Thurs, week 10_

Project


_Tues, week 11_

- Biostats pitch
- ReichLab research
- Lecture 8: lecture8-inference

_Thurs, week 11_

- Activity from lecture 8

_Tues, week 12_

- Lecture 9: understanding uncertainty - sampling distributions, etc...
- Lecture 9 activity

_Thurs, week 12_

- lab 7 (con't)

<!-- unedited below here -->

_Tues, week 9_

- announcements: career info, survey methods info session
- hand out old version of exam and discuss differences
- logistic regression is fair game this year
- we have emphasized less the model syntax
Expand Down
10 changes: 5 additions & 5 deletions pages/schedule.md
Expand Up @@ -43,14 +43,14 @@ Month &nbsp; | Day | | Topic | Notes &nbsp; | HW Due &nbsp; | Reading
| Th, 8| | | | |
| Fri, 9| | | | [CC4](../assets/challenges/coding-challenge-4.pdf) |
| Mo, 12| | Projects due | | |
| Tu, 13| | Understanding Uncertainty | <!--[Lec 8](../assets/lectures/lecture8-confidence/lecture8-inference.pdf), [Suppl](../assets/lectures/lecture8-confidence/lecture8-activity.html) -->| | Kaplan 11-13
| Th, 15| | Understanding Uncertainty | <!--[Lec 9](../assets/lectures/lecture9-intervals/lecture9-intervals.pdf), [Suppl](../assets/lectures/lecture9-intervals/lecture9-activity.Rmd)--> | ||
| Fri, 16| | | | |
| Tu, 13| | Understanding Uncertainty | [Lec 8](../assets/lectures/lecture8-confidence/lecture8-inference.pdf) | | Kaplan 11-13
| Th, 15| | Understanding Uncertainty | [Suppl](../assets/lectures/lecture8-confidence/lecture8-activity.html) | ||
| Fri, 16| | | | |
| Tu, 20| | _Thanksgiving_ | | |
| Th, 22| | _Thanksgiving_ | | |
| Tu, 27| | Understanding Uncertainty | || Kaplan 14-15
| Tu, 27| | Understanding Uncertainty | [Lec 9](../assets/lectures/lecture9-intervals/lecture9-intervals.pdf), [Suppl](../assets/lectures/lecture9-intervals/lecture9-activity.Rmd) | | Kaplan 14-15
| Th, 29| | Understanding Uncertainty | || Kaplan 14-15
| Fri, 30| | | | Lab 5 |
| Fri, 30| | | | Lab 5<!-- [Lab 5](../assets/labs/lab5-logit/lab5-logit.pdf)--> |
Dec | Tu, 4| | Professional Ethics | | | [MDSR 6](http://mdsr-book.github.io/excerpts/mdsr-ethics.pdf)
| Th, 6| | Final exam review | | |
| Fri, 7| | | | Lab 6<!--(../assets/labs/lab6-infer/lab6-infer.pdf)-->|
Expand Down

0 comments on commit 882016b

Please sign in to comment.