I want to calculate the variance in a dataset collected at a given time (t) for which we know the frequency of the conditional and decision attributes.
Every conditional attribute can take 3 possible values while the outcome consists of a two-classe attribute, as can be seen in the picture given below. What I need is to calculate the variance of this given data snapshot.
I would also be interested in sample code or algorithm.
!
I think you would be better off asking this on the “statsOverflow” page 🙂
The question above is a bit unclear to me, but in discrete cases you would calculate the variance with the following algorithm: