How do I estimate the parameters of a bivariate normal distribution in R from real data?
<p>I have a set of x-y pairs from real data that I want to model with a bivariate normal distribution, made up of two normal distributions X and Y. I want to calculate the parameters so that I can recreate the distribution without having to use the original source data as it is too expensive (a million rows).</p>

<p>At the moment I am successfully plotting this data with:</p>

<pre><code>hexbinplot(x~y, data=xyPairs, xbins=16)
</code></pre>

<p>I think I need to estimate the following parameters:</p>

<ul>
<li>Mean of distribution X</li>
<li>Standard deviation of distribution X</li>
<li>Mean of distribution Y</li>
<li>Standard deviation of distribution Y</li>
<li>Rho, which is used to create a Sigma matrix</li>
</ul>

<p>Then the bivariate normal is specified with:</p>

<p><a href="https://i.stack.imgur.com/NuAdw.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NuAdw.png" alt="Bivariate normal distribution parameters"></a></p>

<p>Is there a package to do this in R?</p>

<p>I have looked through a number of packages but most of them help you simulate a bivariate with random data, instead of helping you create a bivariate normal distribution that models real data.</p>

<p>Please let me know if you would like any more details.</p>