# PlotBivInvGaus

## Introduction

This vignette describes the use of the ‘PlotBivInvGaus()’ functions. The goal of this function is to plot the Density contour Plot for Bivariate Inverse Gaussian Distribution.

In this vignette, first we introduce Bivariate Inverse Gaussian Distribution. Suppose \((Z_1,Z_2)\) have a standard bivariate normal distribution with correlation v. Now we define \(U = Z_1^2\) and \(V = Z_2^2\). These \(U\) and \(V\) both will have chi-squared distributions with 1 degree of freedom. Then, \((U,V)\) has Kibble’s bivariate gamma distribution with \(\alpha = 1/2\) . Consider the two-to-one transformations \(U = (X-\mu_1)^2/(\mu_1^2X)\) and \(V = (Y-\mu_2)^2/(\mu_2^2Y)\) , then solving for \(X\) and \(Y\) their joint distribution turns out to be Bivariate Inverse Gaussian Distribution.

    library(PlotBivInvGaus)
    #> Loading required package: plotly
    #> Loading required package: ggplot2
    #>
    #> Attaching package: 'plotly'
    #> The following object is masked from 'package:ggplot2':
    #>
    #>     last_plot
    #> The following object is masked from 'package:stats':
    #>
    #>     filter
    #> The following object is masked from 'package:graphics':
    #>
    #>     layout

## Examples

- Example 1

Suppose we have parameters as u1=2, u2=3, l1=4, l1=3, r=0.5 and v=0.2. Now, we plot the Density contour Plot.

    x=seq(1,10,0.2)
    y=seq(1,10,0.2)
    v=0.2
    r=0.5
    l1=2
    l2=3
    u1=4
    u2=3
    PlotBivInvGaus(x,y,u1,u2,l1,l2,r,v)

- Example 2

Now, we change the parameters and plot the Density contour Plot.

    x=seq(1,10,0.2)
    y=seq(1,10,0.2)
    v=0.3
    r=0.6
    l1=10
    l2=10
    u1=3
    u2=3
    PlotBivInvGaus(x,y,u1,u2,l1,l2,r,v)