How determine The most possibility probable with programming

i have a scatter chart of probable of happen some thing like below chart

link of google chart

i what determine the probable The most point in below chart , can use a mathematic method to determine for programming




Do you just have this chart as a picture, or do you also have the values for the data points?
– Karsten 7.
Aug 29 ’14 at 8:59



have valuse of points , you can see the caluse of google chart link
Aug 29 ’14 at 9:00



want single value of most likely value
Aug 29 ’14 at 10:21



of course it’s better find some single value that are most likely values
Aug 29 ’14 at 10:24


1 Answer




from your link.
There a two possible interpretations for these data points.

Interpretation as univariate distribution

Interpreting the yValues as weights and finding the most probable xValue as the objective.
One can create a WeightedData object using

wData = WeightedData[xValues, yValues]

and then calculate the mean with



and other statistics, like the standard deviation with


It is even possible to plot a PDF for the data

With[{dist = SmoothKernelDistribution[wData]},
Plot[Evaluate[PDF[dist, \[FormalT]]], {\[FormalT],
Min[wData[“InputData”]] – 2 dist[“Bandwidth”],
Max[wData[“InputData”]] + 2 dist[“Bandwidth”]}, PlotRange -> All]]

Interpretation as multivariate distribution

Interpreting the xValues and yValues as 2D data points and with “finding the most probable {x,y} data point” as the objective.
One can create an EmpiricalDistribution object

ed2D = EmpiricalDistribution[Transpose[{xValues, yValues}]]

and then calculate its mean with


{-0.227361, 1.88819}

A visualization of the PDF together with a red line at the mean point and a blue line at the maximum point

Module[{dist = SmoothKernelDistribution[Transpose[{xValues, yValues}]],
meanPoint = Mean[ed2D], maxPoint},
maxPoint = ArgMax[PDF[dist, {x, y}], {x, y}];
Show[Plot3D[Evaluate[PDF[dist, {x, y}]],
{x, Min[xValues] – 2 First@dist[“Bandwidth”], Max[xValues] + 2 First@dist[“Bandwidth”]},
{y, Min[yValues] – 2 Last@dist[“Bandwidth”], Max[yValues] + 2 Last@dist[“Bandwidth”]},
PlotRange -> All],
Graphics3D[{Darker@Red, Thickness[.02],
Line[{Append[meanPoint, 0], Append[meanPoint, 0.13]}]}],
Graphics3D[{Darker@Blue, Thickness[.02],
Line[{Append[maxPoint, 0], Append[maxPoint, 0.18]}]}] ]]



thanx a lot great answer.
Aug 29 ’14 at 11:10



Just curious:Why are you interpreting the y values as weights and not the whole thing as 2D points?
– Dr. belisarius
Aug 29 ’14 at 11:22



@belisarius It’s just that I “saw” the PDF of a univariate distribution when I looked at the image. Nevertheless, a multivariate distribution is reasonable too, based on the limited information given about the context of these data points. E.g. something like Plot3D[Evaluate@CDF[EmpiricalDistribution[Transpose[{xValues‌​,yValues}]],{x,y}],{‌​x,-35,35},{y,0,2.5},‌​Exclusions->None] makes sense too.
– Karsten 7.
Aug 29 ’14 at 11:55



@belisarius And of course Mean[EmpiricalDistribution[Transpose[{xValues, yValues}]]]
– Karsten 7.
Aug 29 ’14 at 12:08



Perhaps you could add that “another” POV
– Dr. belisarius
Aug 29 ’14 at 12:10