# How to obtain an approximate function for SmoothHistogram3D?

I have a random distribution of points in the $x\!-\!y$ plane. I can obtain a graphical representation of the probability distribution function using SmoothHistogram3D. Now I need to use this in another calculation. To do this I need a function that approximates SmoothHistogram3D.

Could you please tell me how to do it?

-
Look up SmoothKernelDistribution[]. –  Guess who it is. Apr 26 '13 at 17:33
That was a brilliant suggestion J.M. I am over the moon. I tested it with NIntegrate by generating a PDF and it worked superbly. All the best. Eitan –  Eitan Abraham Apr 26 '13 at 19:49
@J.M. this should be an answer –  Vitaliy Kaurov Apr 26 '13 at 20:03

At Vitaliy's behest:

You want the distribution SmoothKernelDistribution[], which can be treated like any other distribution by feeding it into PDF[], CDF[]...

Here's a comparison for reference:

BlockRandom[SeedRandom[197, Method -> "MersenneTwister"]; (* for reproducibility *)
data = RandomVariate[BinormalDistribution[.75], 25]];

dist = SmoothKernelDistribution[data, "StandardGaussian", "Gaussian"];
{DensityPlot[PDF[dist, {x, y}], {x, -3.5, 3.8}, {y, -3.9, 4.2}, Mesh -> Automatic,
MeshFunctions -> {#3 &}],
SmoothDensityHistogram[data, {"StandardGaussian", "Gaussian"}, "PDF"]} // GraphicsRow


-
I appreciate that you include the bandwidth and kernel to show how they map from one function to the other. –  Brett Champion Apr 27 '13 at 2:42
I take the extra mile whenever feasible... :) –  Guess who it is. Apr 27 '13 at 2:46