more work

This commit is contained in:
2022-09-13 23:27:50 -07:00
parent 0d08907a15
commit 2c6cfadb0c
5 changed files with 199 additions and 100 deletions

View File

@@ -543,4 +543,27 @@ are likelihoods. We are determining how likely each value of
$\pi$ is given that we have observed $Y = 1$.
:::
We can formalize the likelihood function $L$ in our example
as follows:
$$L(\pi|y=1) = f(y=1|\pi) = {6 \choose 1}\pi^1(1-\pi)^{6-1}$$
$$ = 6\pi(1 - \pi)^5$$
We can test this out
```{r}
6 * .2 * (.8 ^ 5)
```
which is the value we get as .2 in the bar plot above.
the likelihood values for $Y = 1$ are here:
```{r}
d |>
filter(ys == 1)|>
select(-display_pi) |>
knitr::kable()
```