-
Notifications
You must be signed in to change notification settings - Fork 11
/
common-mistakes.qmd
61 lines (36 loc) · 1.11 KB
/
common-mistakes.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Common Mistakes
---
{{< include shared-config.qmd >}}
## Parameters versus random variables
The parameters of a probability distribution shouldn't involve the random variables being modeled:
:::{.callout-warning}
### This is wrong
$$X \sim Pois(\lambda)$$
$$\hat{\lambda}_{ML} \rightarrow_D N(\bar{X}, \lambda/n)$$
:::
::::{.solution}
$$\hat{\lambda}_{ML} \rightarrow_D N(\lambda, \lambda/n)$$
::::
Expectations are means, not sums, despite the similarity of $\Sigma$ and $\text{E}$.
Really, we should use $\mu$ instead of $\text{E}$.
## R
### Don't copy-paste code
Successful programmers don't use copy-paste! [Write functions instead.](https://r4ds.hadley.nz/functions#introduction)
## Quarto
### Separate divs and slide breaks
Make sure not to put a div `:::` on the next line after a slide break `---`:
```
---
::: notes
:::
```
There needs to be an empty line between them:
```
---
::: notes
:::
```
### `library(printr)` currently breaks `df-print: paged`
See <https://github.com/yihui/printr/issues/41>
## LaTeX
Double superscript issues: <https://www.overleaf.com/learn/latex/Errors/Double_superscript>