How to find the most common statistical value in an array?
Mostra commenti meno recenti
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" ?
Risposta accettata
Più risposte (2)
grapevine
il 27 Giu 2012
0 voti
Take a look at this function:
mode - Most frequent values in array
5 Commenti
ref
il 27 Giu 2012
grapevine
il 27 Giu 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
il 27 Giu 2012
Walter Roberson
il 27 Giu 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
il 27 Giu 2012
Image Analyst
il 28 Giu 2012
0 voti
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.
Categorie
Scopri di più su Data Distribution Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!