One final comment:
If you're trying to calculate variance and standard deviation, you don't divide by num, you divide by (num - 1).
I forget why you do this, but variance and st.dev. are always over the number of samples minus one.
This is a discussion on How do I base size of arrays on annother number? within the C++ Programming forums, part of the General Programming Boards category; One final comment: If you're trying to calculate variance and standard deviation, you don't divide by num, you divide by ...
One final comment:
If you're trying to calculate variance and standard deviation, you don't divide by num, you divide by (num - 1).
I forget why you do this, but variance and st.dev. are always over the number of samples minus one.