Docsity

Notes on Random Sampling and Data Description | 101 120, Study notes of Physiotherapy

Toggle sidebar
bg1
Chapter 6: RANDOM SAMPLING AND
DATA DESCRIPTION
Part 1: Random Sampling
Numerical Summaries
Stem-n-Leaf plots
Histograms, and Box plots
Sections 6-1 to 6-4
Random Sampling
In statistics, we’re usually interested in a value
or parameter that describes a particular population.
Such as...
•the mean cholesterol level of all 50 year old
men
–value of interest is the mean
–population is all 50 year old men
1
•the mean height of all NBA basketball play-
ers
–value of interest is the mean
–population is all NBA basketball players
•The mean number of worker-related failures
occurring on any given Friday
–value of interest is the mean
–population is all Fridays
•The mean hole diameter of manufactured wash-
ers
–value of interest is the mean
–population is all manufactured washers
2
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Notes on Random Sampling and Data Description | 101 120 and more Study notes Physiotherapy in PDF only on Docsity!

Chapter 6: RANDOM SAMPLING AND DATA DESCRIPTION

Part 1: Random Sampling Numerical Summaries Stem-n-Leaf plots Histograms, and Box plots Sections 6-1 to 6-

Random Sampling

In statistics, we’re usually interested in a value or parameter that describes a particular population. Such as...

  • the mean cholesterol level of all 50 year old men - value of interest is the mean - population is all 50 year old men - the mean height of all NBA basketball play- ers - value of interest is the mean - population is all NBA basketball players - The mean number of worker-related failures occurring on any given Friday - value of interest is the mean - population is all Fridays - The mean hole diameter of manufactured wash- ers - value of interest is the mean - population is all manufactured washers

Gathering data on all individuals in a popula- tion is usually not realistic (though the census attempts this every 10 years).

But we can get info on a population by looking at subset of the population.

To get at the population parameters (such as the population mean μ), we collect data on a subset of the full population. Often, this is done with a simple random sample of the population, which means the observations were taken totally at random.

What do we do with the data once we collect it? We can summarize it in a useful manner. One option is to report a statistic from the data.

  • Statistic A statistic is a summary value calculated from a sample of observations. Usually, a statistic is an estimator of some population parame- ter.

Suppose we collect n observations in a sample x 1 , x 2 ,... , x (^) n , from a particular population,

Estimates the Statistic population parameter

Sample mean: μ x ¯ =

∑n i=1 x^ i n

Sample variance: σ 2 s 2 =

∑n i=1 (x^ i^ −x¯)^2 n− 1

Numerical Summaries Section 6-

The sample mean and the sample variance are numerical summaries of the sample data. The sample standard deviation is the square root of the sample variance.

The full (larger) population of interest maybe an actual physical population, but it could also be a conceptual population if the population doesn’t physically exist, as with ‘all components that will be manufactured and sold’.

As we saw earlier, the sample variance s 2 essen- tially describes the ‘average’ squared distance of an observation from the sample mean.

There are n = 8 observations in the sample below. The deviations from the sample mean |x (^) i − x¯| are shown below:

Sample variance:

s 2 =

∑n i=1 (x^ i^ −^ x¯)^ 2 n − 1

Computation of s 2

Original formula and alternatives:

s 2 =

∑n i=1 (x^ i^ −^ x¯)^

2 n − 1

∑n i=1 (x^

2 i )^ −^

( ∑n i=1 x^ i^ )^2 n n − 1

∑n i=1 (x^

2 i )^ −^ nx¯^

2 n − 1

Note that the divisor for sample variance is n − 1. We subtract 1 from the sample size be- cause we had to estimate μ with ¯x in order to compute the sample variance.

We’re interested in how the observations are dis- persed around μ, but we only have information on how the observations are dispersed around ¯x.

If we didn’t make this adjustment, our estimate for σ 2 (i.e. our s 2 value), would consistenty be too small in estimating the true population vari- ance.

We also say, s 2 is based on n−1 degrees of freedom. We’ll discuss this more later.

Another measure of sample spread is the sample range.

  • Sample Range If the n observations in a sample are denoted by x 1 , x 2 ,... , x (^) n , the sample range is

r = max(x (^) i ) − min(x (^) i )

This is as a single value, not 2 individual val- ues.

We can look at a stem-n-leaf diagram to get a feel for the full distribution of the data.

7 | 6 8 | 7 9 | 7 10 | 15 11 | 058 12 | 013 13 | 133455 14 | 12356899 15 | 001344678888 16 | 0003357789 17 | 0112445668 18 | 0011346 19 | 034699 20 | 0178 21 | 8 22 | 189 23 | 7 24 | 5

The decimal point is 1 digit(s) to the right of the |

The minimum value is 76. ‘7’ is the stem, and ‘6’ is the leaf. The maximum value is 245. ‘24’ is the stem, and ‘5’ is the leaf.

The ‘legend’ tells us where the decimal is at.

This stem-n-leaf suggests this distribution can be described as bell-shaped and unimodal (i.e. has one peak).

Steps for making a Stem-n-Leaf Dia- gram

  1. Separate each observation into a stem con- sisting of all but the final (rightmost) digit and a leaf, the final digit. Stems may have as many digits as needed, but each leaf con- tains only a single digit.
  2. Write the stems in a vertical column with the smallest at the top, and draw a vertical line at the right of this column.
  3. Write each leaf in the row to the right of its stem, in increasing order out from the stem.

If there are too many values for each stem, you can also do a split-stem-n-leaf diagram by split- ting the values for each stem.

  • Quartiles

The positions that break the data into 4 quad- rants, each containing 25% of the data are the quartiles. The first quartile(q 1 ), the sec- ond quartile(q 2 − also called the median), and the third quartile(q 3 ).

  • This data set has q 1 = 64. 5 q 2 = 68 q 3 = 72

There are a number of ways to find positions the break the data into the 25% proportions since the data is discrete. But here’s one op- tion: q 1 is the interpolated value between the data points at ordered positions of " n+1 4 # and $ n+1 4 %

q 3 is the interpolated value between the data points at ordered positions of " 3(n 4 +1) # and $ 3(n 4 +1) %

(These are symbols for rounded-down " # and rounded-up $ %, respectively)

The interquartile range(IQR) is equal to q 3 − q 1 and is a measure of variability. The IQR is less sensitive to extremes than the ordinary sample range.

  • Percentiles The 100kth percentile is a data value such that approximately 100k% of the observa- tions are at or below this value and approxi- mately 100(1 − k)% of them are above it (for 0 < k < 1).
  • Example: Mean and Median

A manufacturer of electronic components is interested in determining the lifetime of a certain type of battery. A sample, in hours of life, is as follows:

a) Find the sample mean and median.

b) What feature in this data set is responsi- ble for the substantial difference between the mean and median?

Frequency Distributions and Histograms Section 6-

A frequency distribution is a table that divides a set of data into a suitable number of classes (categories), showing also the number of items belonging to each class.

Consider the following stem-n-leaf diagram for humidity readings rounded to the nearest per- cent.

Stem Leaf 1 2 5 7 2 1 1 3 4 5 7 8 9 3 2 4 4 7 9 4 2 4 8 5 3

We might group these data into the following frequency distribution:

Cumulative Class Class Frequency Relative Relative Interval midpoint f frequency frequency 61-80 70.5 1 1/80 = 0.0125 0. 81-100 90.5 2 2/80 = 0.0250 0. 101-120 110.5 6 6/80 = 0.0750 0. 121-140 130.5 8 8/80 = 0.1000 0. 141-160 150.5 23 23/80 = 0.2875 0. 161-180 170.5 19 19/80 = 0.2375 0. 181-200 190.5 12 12/80 = 0.1500 0. 201-220 210.5 4 4/80 = 0.0500 0. 221-240 230.5 4 4/80 = 0.0500 0. 241-260 250.5 1 1/80 = 0.0125 1.

The histogram for this frequency table...

Histogram of data

data

Frequency

100 150 200 250

0

5

10

15

20

We can see this is a unimodal distribution with a bell-shape.

NOTE: The bin widths can alter the shape of a histogram. For instance, if I only chose 3 bins...

Histogram of data

data

Frequency

0 50 100 150 200 250 300

0

10

20

30

40

50

60

70

This is not as informative. In general, you don’t want too many or too few observations in each bin (relative to n), and you can play around with bin size for the best scenario.

We summarize data in a histogram (by lump- ing a lot of individual observations together in a cell), so we lose some information. But this loss is usually small compared to the information gained in the visual, and the ease of interpreta- tion gained in the graph.

  • Some possible descriptions of histograms
    • Symmetric
    • Skewed (asymmetric, long tail to one side) Right-tail stretched out... positive skew Left-tail stretched out... negative skew
    • Unimodal (one peak)
    • Bimodal (two peaks)
    • Bell-shaped
    • uniformly distributed (flat)

Box Plots Section 6-

Boxplots are another graphical tool for visual- izing data.

Boxplots utilize the quartiles to give us a feel for the data distribution.

Values in the boxplot:

q (^1) q (^2) q (^3)

these values form the box

1.5 × IQR forms the whiskers (distance from q 1 or q 3 )

outliers values past the whiskers (past q 1 − 1.5 × IQR or past q 3 + 1.5 × IQR) seen at either tail