Mitjana | ||||||||||||||||||||
Si tenim poques dades, el més fàcil és sumar els diferents valors de la variable xi i dividir aquesta suma pel nombre d'elements de la població. Si el nombre de dades és més elevat, la mitjana es calcula amb l'expressió: «math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mover mathcolor=¨#003300¨»«mi mathvariant=¨bold¨»x«/mi»«mo mathvariant=¨bold¨»§#175;«/mo»«/mover»«mo mathvariant=¨bold¨ mathcolor=¨#003300¨»=«/mo»«mo mathvariant=¨bold¨ mathcolor=¨#003300¨»§#160;«/mo»«munderover mathcolor=¨#003300¨»«mo mathvariant=¨bold¨»§#8721;«/mo»«mrow»«mi mathvariant=¨bold¨»i«/mi»«mo mathvariant=¨bold¨»=«/mo»«mn mathvariant=¨bold¨»1«/mn»«/mrow»«mi mathvariant=¨bold¨»j«/mi»«/munderover»«msub mathcolor=¨#003300¨»«mi mathvariant=¨bold-italic¨ mathcolor=¨#003300¨»x«/mi»«mi mathvariant=¨bold¨»i«/mi»«/msub»«mo mathvariant=¨bold¨ mathcolor=¨#003300¨»§#183;«/mo»«msub mathcolor=¨#003300¨»«mi mathvariant=¨bold-italic¨ mathcolor=¨#003300¨»f«/mi»«mi mathvariant=¨bold¨»i«/mi»«/msub»«/math»
Si xi són els valors que pren la variable, fi la freqüència relativa de cada un d'aquests valors i j el nombre de valors que pren la variable. El més pràctic és emprar una taula de freqüències:
|