Docsity

Calculating Statistics: Mean, Variance, Deviation, Median, Mode, and Quartiles - Prof. Dav, Study notes of Statistics

Toggle sidebar
bg1
Dr. Neal, Spring 2009
MATH 203 Basic Statistics
Let
Ω
be a population under consideration and let
X
be a specific measurement that we
are analyzing. For example,
Ω
= All U.S. households and
X
= Number of children
(under age 18) living in the household. To study this scenario, we obtain a set of
measurements {x
1,x2,..., xn
} which may be either a census or simply a random sample.
Census
In a census, we assume that we have a measurement from every member in the
population under consideration. For small populations, such as students in one
particular class or players on one sports team, it is not hard to obtain a census by
surveying each person in that population. But for extremely large populations, such as
all U.S. households, it is nearly impossible to obtain a real census even when mandated
to do so every ten years by the United States Constitution.
But when we do have a census of measurements
X
from a population, then we can
find the true values of the mean , the variance 2, the standard deviation , as well
as other population parameters.
Mean
Given a set of
n
measurements {x
1,x2,..., xn
}, the mean (or average) of these specific
values is given by
= x1+x2+...+xn
n
.
When the values are a census of a specific measurement
X
from a population
Ω
,
then is true average value. It is also called the expected value of
X
and may be
denoted by
X
or E[X].
Variance
The variance, denoted by
2
, is the average squared distance from the mean and is
given by
2=(x1−)2+(x2−)2+... +(xn−)2
n=1
n(xi−)2
i=1
n
∑
Alternately, the variance is “the average of the squares” minus “the square of
average,” and can be computed by
2
= x12+x22+...+xn2
n
–
2
.
The variance is sometimes denoted by
X
2
or Var(X).
pf3
pf4
pf5
pf8

Partial preview of the text

Download Calculating Statistics: Mean, Variance, Deviation, Median, Mode, and Quartiles - Prof. Dav and more Study notes Statistics in PDF only on Docsity!

MATH 203 Basic Statistics

Let Ω be a population under consideration and let X be a specific measurement that we are analyzing. For example, Ω = All U.S. households and X = Number of children (under age 18) living in the household. To study this scenario, we obtain a set of measurements { x 1 , x 2 ,..., xn } which may be either a census or simply a random sample.

Census

In a census, we assume that we have a measurement from every member in the population under consideration. For small populations, such as students in one particular class or players on one sports team, it is not hard to obtain a census by surveying each person in that population. But for extremely large populations, such as all U.S. households, it is nearly impossible to obtain a real census even when mandated to do so every ten years by the United States Constitution.

But when we do have a census of measurements X from a population, then we can find the true values of the mean , the variance 2 , the standard deviation , as well as other population parameters.

Mean

Given a set of n measurements { x 1 , x 2 ,..., xn }, the mean (or average ) of these specific

values is given by

x 1 + x 2 +... + xn n

When the values are a census of a specific measurement X from a population Ω , then is true average value. It is also called the expected value of X and may be

denoted by (^) X or E [ X ].

Variance

The variance , denoted by 2 , is the average squared distance from the mean and is given by

(^2) = ( x 1 −^ )

(^2) + ( x 2 −^ )

(^2) + ... + ( x n −^ )

2

n

n

( xi − )^2 i = 1

n

Alternately, the variance is “the average of the squares” minus “the square of average,” and can be computed by

(^2) = x 1

(^2) + x 2

(^2) +... + x n

2

n

The variance is sometimes denoted by (^) X^2 or Var ( X ).

Standard Deviation

We take the square root of the variance to get the standard deviation denoted by :

n

( xi − )^2 i = 1

n

The standard deviation gives a way of measuring the average spread from the mean. A small means that measurements are consistently close to the average.

Median and Mode

When the measurements { x 1 , x 2 ,..., xn } are in increasing order, then the median is the

“middle” value, or the average of the two middle values if there are an even number of measurements. The mode is the measurement (or measurements) that occurs most often.

Example 1. Below are the number of credit hours enrolled for this semester for all students in one section of MATH 116. Find the mean, variance, standard deviation, median, and mode of these values. What percentage of these measurements are within one standard deviation of class average?

Credit Hours Taken This Semester 18 15 14 13 18 14 14 18 17 15 16 18 18 18 15 15 15 17 18 13 15 18 14 18 15 18 15 19 18 14 16 17 16 14 15 15

Solution. Let Ω = this specific MATH 116 class and let X = Number of credit hours enrolled in this semester. Because we have a census of this class, we can find the true mean and the true standard deviation. To do so, we shall enter the data into the calculator, sort it into increasing order, and use the 1–Vars Stats command.

Enter data into L1 Sort data then enter 1–Var Stats L

Output Scroll down

The mean is =

= 16 credit hrs

Note : The calculator displays this value as x , which stands for sample mean. But because we have a census of this class and not merely a sample, we use to represent that we have the real average of = 16 credit hours.

Sample Mean and Sample Deviation

Often a collection of measurements is just a sample from a larger population. In this case, we cannot find the real average. Instead we can only compute the sample mean denoted by x. However, x is computed the same way as we computed by adding up the values and dividing by n ; we just denote it now by x to specify that we are only working with a sample.

The sample deviation , denoted by S , is computed similarly to ; however, we use x in the formula, rather than , and we average the squared differences by dividing by

n − 1 rather than n.

n

( xi − )^2 i = 1

n

∑ S^ =^

n − 1

( xi − x )^2 i = 1

n

For a census For a sample

By dividing by n − 1 , the sample variance S^2 becomes an unbiased estimator of the

true unknown variance 2. That is, the average of all possible S^2 from all possible

samples of size n will equal the true variance 2.

Quartiles and 1.5 IQR

The first quartile Q 1 is the median of just the measurements that are below the overall median. The third quartile Q 3 is the median of just the measurements that are above the overall median. These values are displayed, along with the minimum, median, and maximum, in the 1–Vars Stats output. Together, the values min – Q 1 – med – Q 3 – max make up the five-number summary.

The 1.5 IQR (or 1.5 Interquartile Range ) is the interval Q 1 − 1.5 × (Q 3 − Q 1 ) to Q 3 + 1.5 × (Q 3 − Q 1 ). Values from a sample that are outside this range are called outliers

and are often excluded from samples so as not to throw off the average too much.

Example 2. Below are data on city mpg from a sample of two-seater cars:

Model City MPG Model City Acura NSX 17 Honda Insight 57 Audi TT Quattro 20 Honda S2000 20 Audi TT Roadster 22 Lamborghini Murcielago 9 BMW M Coupe 17 Mazda Miata 22 BMW Z3 Coupe 19 Mercedes-Benz SL500 16 BMW Z3 Roadster 20 Mercedes-Benz SL600 13 BMW Z8 13 Mercedes-Benz SLK230 23 Chevrolet Corvette 18 Mercedes-Benz SLK320 20 Chrysler Prowler 18 Porsche 911 GT2 15 Ferrari 360 Modena 11 Porsche Boxter 19 Ford Thunderbird 17 Toyota MR2 25

Use your calculator for the following:

(i) Find the sample mean and sample deviation, the median, the mode, and the five- number summary. What percentage of these mileages are within one sample deviation of sample average?

(ii) Make a histogram with range of [5, 60] divided into bins of length 5. Which bin has the most measurements? The second most?

(iii) Give the 1.5 IQR and denote any suspected outliers.

Solution. (i) We first enter the data into a list in the STAT EDIT screen. For this problem we shall use L2. After entering the data, we sort the data with the command SortA(L2. Then we compute the statistics with the command 1–Var Stats L.

Enter data into L2 Sort and compute stats

Output Scroll down

Because the data are only a sample of measurements from the population Ω of all two-seater makes of cars, the value of x ≈ 19.59 is the sample mean. The sample deviation is displayed as S ≈ 9.. The minimum value is shown to be 9 while the maximum value is 57. The median is given as 18.5. That is, 18.5 is the average of the two “middle” measurements when in increasing order (the 11th and 12th with this data set of even-size 22). The 11th value is 18 while the 12th value is 19. So the median is (18 + 19)/2 = 18.5. The first quartile is Q 1 = 16, which is the median of all values below 18.5. And Q 3 = 20, which is the median of all values above 18.5. So the five-number summary is 9 – 16 – 18.5 – 20 – 57.

By scrolling down the sorted list, we see that the mode is 20 which occurs most often at 4 times.

The range x ± S is 19.59 ± 9.22 , which is 10.37 to 28.81, contains 20 out of 22 measurements. So we can say that 90.9% of these mileages are within one sample deviation of sample average.

(ii) Adjust the WINDOW and STAT PLOT settings to see a histogram (3rd type). Press GRAPH , then TRACE and scroll to see the bin range values. The range [15, 20) has 9 values while the range [20, 25) has 7 values.

Adjust WINDOW Adjust STAT PLOT Histogram TRACE

Next we compute x ± S = 1.86 ± 1.34, which is 0.52 to 3.2. This range includes all households having 1, 2, or 3 children. There are (42 + 86 + 59) = 187 out of 275 such households, or 68% within a sample deviation of sample average.

The 1.5 IQR is from 1 − 1.5 × 2 to 3 + 1.5 × 2 , or –2 to 6; thus, there are no outliers because all measurements are within this range.

Exercise 1. Consider the Verbal ACT scores from a group of English majors at WKU: 16, 18, 20, 21, 21, 22, 22, 23, 24, 25, 26, 27, 30, 34

(a) Make a histogram with range [15, 36] and bins of length 3. Which bin range has the most scores?

(b) Assuming this group is the entire population under consideration:

(i) Find the true mean. (ii) Find and explain the median and the mode. (iii) Find the true standard deviation. (iv) Compute the percentage of these students whose Verbal ACT score is within a standard deviation of average.

(c) Assuming this group is only a sample from a larger population Ω :

(i) Find the sample mean and sample deviation. (ii) Give the boundaries of the 1.5 IQR and state the outliers.

(iii) In this case, what is the appropriate larger population Ω that this sample could represent?

Exercise 2. A group of WKU freshman were asked to give the number of hours taken during their first semester. The results were:

Hrs 13 14 14.5 15 15.5 16 16.5 17 18 # Fr 4 5 8 14 8 23 12 18 8

(a) Make a histogram with bins of length 1. Which bin range has the most values?

(b) Assuming this group is the entire population under consideration:

(i) Find the true mean. (ii) Find and explain the median and the mode. (iii) Find the true standard deviation. (iv) Compute the percentage of these students whose Verbal ACT score is within a standard deviation of average.

(c) Assuming this group is only a sample from a larger population Ω :

(i) Find the sample mean and sample deviation. (ii) Give the boundaries of the 1.5 IQR and state the outliers.

(iii) In this case, what is the appropriate larger population Ω that this sample could represent?

Solutions

Data in L1 Adjust WINDOW Adjust STAT PLOT (a) [21, 24) has 5 scores

(b) (i) = 23.5 (ii) Because there are 14 scores, the median is the average of the 7th and 8th scores, which is (22 + 23)/2 = 22.5. The modes are 21 and 22 (both occur twice, and no other score occurs more than once).

(iii) ≈ 4.547 (iv) ± is 18.953 to 28.047 and contains 10/14 or 71.43% of the scores.

(c) Assuming this group is only a sample from a larger population Ω , then

(i) x = 23.5 and S ≈ 4.

(ii) The 1.5 IQR is from 21 − 1.5(26 − 21) to 26 + 1.5(26 − 21), or 13.5 to 33.5. The only

outlier is 34. (iii) Ω = All English majors at WKU.

[16, 17) has 35 scores

(b) (i) = 15.88 hours. (ii) Because there are 100 measurements, the median is the average of the 50th and 51st measurement, which is (16 + 16)/2 = 16. The mode is also 16 hrs because it occurs most often at 23 times.

(iii) ≈ 1.1898. (iv) ± is 14.69 to 17.07, which contains all students taking 15, 15.5, 16, 16.5, or 17 hours. Thus, there are 75 out of 100 or 75% of the students within one standard deviation of average.

(c) (i) x = 15.88 and S ≈ 1.19578 (ii) The 1.5 IQR is from 15 − 1.5 × 2 to

17 + 1.5 × 2 , or 12 to 20 which contains all measurements. There are no outliers. (iii) Ω = All WKU Freshmen.