Learn R Programming

QFRM (version 1.0.1)

pbnorm: Bivariate Standard Normal CDF

Description

Bivariate Standard Normal CDF Calculator For Given Values of x, y, and rho

Usage

pbnorm(x = 0, y = 0, rho = 0)

Arguments

x
The $x$ value (want probability under this value of $x$); values in $(-25, 25)$
y
The $y$ value (want probability under this value of $y$); values in $(-25, 25)$
rho
The correlation between variables $x$ and $y$; values in $[-1, 1]$

Value

Density under the bivariate standard normal distribution

Details

This runs a bivariate standard normal pdf then calculates the cdf from that based on the input parameters

References

Adapted from "Bivariate normal distribution with R", Edouard Tallent's blog from Sep 21, 2012 https://quantcorner.wordpress.com/2012/09/21/bivariate-normal-distribution-with-r

Examples

Run this code
pbnorm(1, 1, .5)
#pbnorm(2, 2, 0)
#pbnorm(-1, -1, .35)
#pbnorm(0, 0, 0)

ttl = 'cdf of x, at y=0'
X = seq(-5,5,1)
graphics::plot(X, sapply(X, function(x) pbnorm(0,x,0)), type='l', main=ttl)

Run the code above in your browser using DataLab