0
$\begingroup$

Forgive my high-school level mathematics but say I have the following dataset:

[2, 3, 4, 5, 6, 6.5, 7, 7.5, 8.5, 9.5]

I want to know what value is most likely to occur in this given dataset. I would typically be after the mode value but each value has a frequency of 1. The mean is 5.9, but I don't believe that is the most probable value.

[6, 6.5, 7, 7.5] are the more interesting subset of values as they are closer in value compared to the rest of the set. However there are 4 values below that subset and 2 values above. So logically I would say I'm looking for a value around 6.5

A solution would be to round the values to:

[2, 3, 4, 5, 6, 7, 7, 8, 9, 10] giving a mode of 7 - or 6.75 if I average the original values.

I'm sure there's a mathematical formula or algorithm that I'm unaware of to find the most likely value of a given dataset. What would be the best approach to solving this?

$\endgroup$
  • $\begingroup$ I think you should clarify your assumptions. Do you consider sampling from a discrete distribution which then puts equal probability on each support point and the support is the given dataset? Or is it a stochastic process? If so, is anything known or assumed with regard to its distribution? $\endgroup$ – Dr_Be Jan 8 '16 at 7:35
  • $\begingroup$ The dataset is stochastic. I'm most interested in where the values cluster together if that makes sense. $\endgroup$ – Ryan King Jan 8 '16 at 7:56
  • $\begingroup$ You could do that, e.g. by assuming a normal distribution, cf. answer from @GGA. But the outcome (6 out of 10 numbers are integers) doesn't suggest that these number have been drawn from a normal distribution. In my opinion your options are very limited without imposing any further "structure". $\endgroup$ – Dr_Be Jan 8 '16 at 8:03
  • $\begingroup$ Well if that would give a better value than using the mean than that's good. How would I do that? The data may not have a normal distribution though. Possible to point me in direction to approaches of adding 'structure' to the dataset? $\endgroup$ – Ryan King Jan 8 '16 at 8:33
  • $\begingroup$ What do you mean by "most probable"? What is known about the data? Can you make any distributional assumptions? Why you do not consider mean to be correct in here? What would you say about using median? $\endgroup$ – Tim Jan 8 '16 at 9:16
3
$\begingroup$

From your question and comments I have impression that you are after mode.

I would typically be after the mode value but each value has a frequency of 1.

It is simply not true that one cannot compute mode for continuous variables

The mode of a discrete probability distribution is the value x at which its probability mass function takes its maximum value. In other words, it is the value that is most likely to be sampled. The mode of a continuous probability distribution is the value x at which its probability density function has its maximum value, so the mode is at the peak. (Wikipedia)

Below you can see simple function in R that calculates kernel density using data vectors you used as examples and then takes maximum density point.

x <- c(1, 2, 3, 4, 5, 6, 6.75, 6.85, 6.9, 7, 7.1, 7.15, 7.25)
y <- c(2, 3, 4, 5, 6, 6.5, 7, 7.5, 8.5, 9.5)
z <- c(2, 3, 4, 5, 6, 7, 7, 8, 9, 10)

dmode <- function(x, ...) {
  dx <- density(x, ...)
  dx$x[which.max(dx$y)]
} 

> dmode(x)
[1] 6.70214
> dmode(y)
[1] 6.70214
> dmode(z)
[1] 6.9075

Kernel density estimates, modes (red) and individual datapoints plotted as rug on the top side of the plot for x and y are shown below.

enter image description here

$\endgroup$
  • $\begingroup$ Yes, this is what I'm looking for! Thanks for your patience :) $\endgroup$ – Ryan King Jan 8 '16 at 10:03
0
$\begingroup$

The are several techniques in descriptive statistic: you cited the mean, the mode and the median.

You can also say this: assuming that the data you are working with have a normal distribution, you can say that approximately the 68% of the values are between the mean and one standard deviation, the 95% between the mean and two standard deviations and 99% between the mean and three standard deviations.

With your data set the results are:

68% between 3,5 - 8,3

$\endgroup$
  • $\begingroup$ I'm more after a single value output for what would be the mostly likely value to occur given this dataset. $\endgroup$ – Ryan King Jan 8 '16 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.