Whiskers in Violin Plot

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Whiskers in Violin Plot

mority
Hi,

I read the documentation of the function violin from the statistics package:

https://octave.sourceforge.io/statistics/function/violin.html

I am wondering what the whiskers in the generated violin plot represent, as
it is not specified in the documentation.

Thanks in advance.

Regards,
mority



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: Whiskers in Violin Plot

Nicklas Karlsson
> Hi,
>
> I read the documentation of the function violin from the statistics package:
>
> https://octave.sourceforge.io/statistics/function/violin.html
>
> I am wondering what the whiskers in the generated violin plot represent, as
> it is not specified in the documentation.

Have read several courses in statistics at university and thought I seen it all. It might be it show the probability distribution, in such case colored "area" should be one. Ring and dot might be mean and typical value, while orthogonal line ending line is variance.

Even though I am not very good at statistics due to have been hit by 100 year storm twice I guess it should not be to hard figure out if looking into the source code.


Regards Nicklas Karlsson


Reply | Threaded
Open this post in threaded view
|

Re: Whiskers in Violin Plot

Juan Pablo Carbajal-2
Hi all,

Thanks for noticing the missing doc.
Indeed the "error bars" are 1st, 2nd (median), and 3rd quartile (as in
boxplots), and the circle is the mean.


Reply | Threaded
Open this post in threaded view
|

Re: Whiskers in Violin Plot

mority
<https://octave.1599824.n4.nabble.com/file/t373726/12345-violin.png>

Thanks for your answer. Sadly, it confuses me further :D

I plotted the a variable x = [1; 2; 3; 4 ; 5] using the function violin (see
picture). If the whiskers mark Q1 and Q3 shouldn't they be at 2 and 4,
respectively?

From plotting other vectors I also gather that the dot is the mean and the
circle marks the median.

I am using Octave 4.2.2 by the way. Maybe this changed?



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: Whiskers in Violin Plot

mority
Ah, OK. It's just another computing method for the quartiles.

I think it uses what is Method 3 here:
https://en.wikipedia.org/wiki/Quartile

Thank you very much. I get it now.



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html