You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix expectation of s² and m in gdemo
The expectation of m cannot be anything different from 0, given the definition. Likewise for an inverse gamma random variable. Former sentence, "the expectation of s is 49/24 (2.04166666...) and the expectation of m is 7/6 (1.16666666...)." cannot be correct.
* Update docs/src/using-turing/guide.md
Co-authored-by: Ramon Diaz-Uriarte <[email protected]>
* Update docs/src/using-turing/guide.md
Co-authored-by: David Widmann <[email protected]>
Co-authored-by: Hong Ge <[email protected]>
Co-authored-by: David Widmann <[email protected]>
Copy file name to clipboardExpand all lines: docs/src/using-turing/guide.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,12 @@ end
42
42
```
43
43
44
44
45
-
Note: As a sanity check, the expectation of `s` is 49/24 (2.04166666...) and the expectation of `m` is 7/6 (1.16666666...).
45
+
Note: As a sanity check, the prior expectation of `s²` is `mean(InverseGamma(2, 3)) = 3/(2 - 1) = 3` and the prior expectation of `m` is 0. This can be easily checked using `Prior`:
We can perform inference by using the `sample` function, the first argument of which is our probabilistic program and the second of which is a sampler. More information on each sampler is located in the [API]({{site.baseurl}}/docs/library).
0 commit comments