Skip to content

Commit

Permalink
Update custom-probability.qmd
Browse files Browse the repository at this point in the history
Fix typo in definition of bivariate normal CDF. This is the standard defn of the CDF and what the `binormal_cdf` example actually computes. Verifiable in R:

```
test_binorm_cdf <- function(a,b,rho,nmc=1e5) {
    xx <- MASS::mvrnorm(nmc, c(0,0), matrix(c(1,rho,rho,1),2,2))
    mean(xx[,1]<a & xx[,2]<b)
}
```
  • Loading branch information
rborder authored Oct 24, 2024
1 parent 36096c5 commit 12ca37a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stan-users-guide/custom-probability.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ definition of the bivariate normal cumulative distribution function
(CDF) with location zero, unit variance, and correlation `rho`.
That is, it computes
$$
\texttt{binormal}\mathtt{\_}\texttt{cdf}(z_1, z_2, \rho) = \Pr[Z_1 > z_1 \text{ and } Z_2 > z_2]
\texttt{binormal}\mathtt{\_}\texttt{cdf}(z_1, z_2, \rho) = \Pr[Z_1 \leq z_1 \text{ and } Z_2 \leq z_2]
$$
where the random 2-vector $Z$ has the distribution
$$
Expand Down

0 comments on commit 12ca37a

Please sign in to comment.