randRange(4, 6) randRange(20, 50) animalAvgLifespan(1) animalStddevLifespan(1) $.map(randGaussian(TGT_MEAN, TGT_STDDEV, DATA_POINTS), function(lifespan) { lifespan = lifespan < 1 ? 1 : round(lifespan); return randRange(1, lifespan); } ) roundTo(1, mean(DATA)) $.map(DATA, function( x ) { return roundTo(2, (x - MEAN) * (x - MEAN)); }) roundTo(2, sum(SQR_DEV) / (DATA_POINTS - 1)) roundTo(2, sum(SQR_DEV) / DATA_POINTS) roundTo(1, stdDev(DATA)) roundTo(1, stdDevPop(DATA)) new Plural(function(num) { return $.ngettext("year", "years", num); }) $._("%(years)s old", {years: plural_form(YEAR, MEAN)})

You have found the following ages (in years) of all DATA_POINTS plural_form(animal(1), DATA_POINTS) at your local zoo:

\qquadDATA.join(",\\enspace ")

What is the average age of the plural_form(animal(1)) at your zoo? What is the standard deviation? You may round your answers to the nearest tenth.

Average age:
\quad mean(DATA) years old

Standard deviation:
\quad stdDevPop(DATA) years

To find the mean, add up the values of all DATA_POINTS ages and divide by DATA_POINTS.

\blue{\mu} \quad = \quad \dfrac{\sum\limits_{i=1}^{\green{N}} x_i}{\green{N}} \quad = \quad \dfrac{\sum\limits_{i=1}^{\green{DATA_POINTS}} x_i}{\green{DATA_POINTS}}

\blue{\mu} \quad = \quad \dfrac{plus.apply(KhanUtil, DATA)}{\green{DATA_POINTS}} \quad = \quad \blue{MEAN\text{ YEARS_OLD}}

Find the squared deviations from the mean for each animal(1).

Age
x_i
Distance from the mean (x_i - \blue{\mu}) (x_i - \blue{\mu})^2
POINT plural("year", POINT) roundTo(2, POINT - MEAN) plural("year", roundTo(2, POINT - MEAN)) SQR_DEV[i] plural("year", SQR_DEV[i])^2

The standard deviation (\red{\sigma}), is found by taking the square root of the mean of the squared deviations from the mean:

\red{\sigma} \quad = \quad \sqrt{\dfrac{\sum\limits_{i=1}^{\green{N}} (x_i - \blue{\mu})^2}{\green{N}}}

\red{\sigma} \quad = \quad \sqrt{\dfrac{plus.apply(KhanUtil, $.map(SQR_DEV, function(x) { return "\\purple{" + x + "}"; }))} {\green{DATA_POINTS}}}

\red{\sigma} \quad = \quad \sqrt{\dfrac{\purple{roundTo(2, sum(SQR_DEV))}}{\green{DATA_POINTS}}}

\red{\sigma} \quad = \quad \sqrt{\red{VARIANCE_POP}} = \red{STDDEV_POP\text{ plural("year", STDDEV_POP)}}

The average animal(1) at the zoo is MEAN year old. The average animal(1) at the zoo is MEAN years old. The standard deviation is STDDEV_POP year. The standard deviation is STDDEV_POP years.