How to find the most common statistical value in an array?
Afficher commentaires plus anciens
Assume that the array consists of real time recordings and appears to have five common values with unknown std (e.g. 5.1356 +/- 1.265, 13.2136 +- 1.564 and so on....). How could you find the most common values in that array with its limits included? One way to do that would be to use the mode function with predefined edges for your common values. But how could you do that without "cheating" ?
Réponse acceptée
Plus de réponses (2)
grapevine
le 27 Juin 2012
0 votes
Take a look at this function:
mode - Most frequent values in array
5 commentaires
ref
le 27 Juin 2012
grapevine
le 27 Juin 2012
What's your array look like?
I mean, In which way do you represent your data ?
What I can guess is since you know the mean value and the standard deviation you can generate the normal distribution
http://www.mathworks.nl/help/toolbox/stats/normrnd.html
the function normrnd returns a data array, then you can use the mode function to find the most common value
ref
le 27 Juin 2012
Walter Roberson
le 27 Juin 2012
What would be permissible to access in that situation? The data used to create that graph? That graph appears to just be sort() of the original data, and when one is doing statistical work, the order of the data is not relevant (unless it is a time-dependent process), so having access to the sorted data would be equivalent to having access to the original data.
ref
le 27 Juin 2012
Image Analyst
le 28 Juin 2012
0 votes
If your data are not integers, but are instead floating point numbers ( single or double), then depending on how they were generated, you may find that none of them are equal, even though you think they should be. See the FAQ on this topic: http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F In that case you should use hist() or histc() which will group values that are close to each other into bins.
Catégories
En savoir plus sur Data Distribution Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!