Docsity

Probability and Statistics for Engineers: Histograms, Measuring Center, and Spread - Prof., Study notes of Statistics

Partial preview of the text

Download Probability and Statistics for Engineers: Histograms, Measuring Center, and Spread - Prof. and more Study notes Statistics in PDF only on Docsity!

North Carolina State University

STAT 370: Probability and Statistics for

EngineersEngineersYichao Wu

Lass class

•^

Histogram– Intervals must be non-overlapping

pp

g

  • Typically, an observation equal to a boundary value is put in the

higher interval.

  • Intervals must be contiguous (rectangles touch each other)

Intervals must be contiguous (rectangles touch each other)

  • Intervals must be equal width– Often choose “nice” boundaries

F^

t bl

l ti

f^

t bl

  • Frequency table, relative frequency table -^

Examining distribution– Shape: symmetric, right skewed, left skewed, bell-shaped

p^

y^

,^

g^

,^

,^

p

  • Center: mode, mean, median– Spread

H

k #1 d

F id

5 PM

Homework #1 due Friday 16 at 5 PMHomework #2 due Friday 23 at 5PM

Histogram (how?)

  • Choose intervals (or bins) that cover the entire range ofthe data– Count the number of observations per interval– Draw rectangles with heights corresponding to number ininterval (for relative frequency histogram, height is relativefrequency of interval)Notes:•^

Intervals must be non-overlapping

-^

Typically an observation equal to a boundary value is put in theTypically, an observation equal to a boundary value is put in thehigher interval.

-^

Intervals must be contiguous (rectangles touch each other)

-^

Intervals must be equal width

-^

Intervals must be equal width

-^

Often choose “nice” boundaries

In-class exercise

The volume of a stock is the number of shares traded on a given day. Thefollowing data, given in millions so that 3.78 represents 3,780,000 sharestraded, represents the volume of Altria Group stock traded for a random sampletraded, represents the volume of Altria Group stock traded for a random sampleof 35 trading days in 2004.3.78 6.06 5.32 3.04 10.32 3.38 10.96 8.74 5.75 3.255 64 3 38 5 53 4 50

4 35 5 34

6 57 5 00

7 25 4 74

5.64 3.38 5.53 4.

4.35 5.

6.57 5.

7.25 4.

7.97 5.02 6.92 7.

7.16 6.

9.70 3.

8.40 6.

6.07 4.88 4.43 3.

(a) Construct a frequency distribution of the data using bin widths of size 2.(b) Construct a relative frequency distribution of the data using bin widths ofsize 2.(c) Construct a frequency histogram and a relative frequency histogram of thedata, using bin widths of size 2.(d) On what percentage of the 40 days were at least 6 million shares traded?(e) Describe the shape of the distribution.Choose intervals: [2, 4), [4, 6), [6, 8), [8, 10), [10, 12]

Measuring center: the median

-^

Median = middle value or center point

-^

The sample median

M

: the number such

The sample median

M

: the number such

that half of the observations are smallerthan it and the other half are larger.–^

the midpoint of a distribution

Procedure to calculate the median:

M

1.^

Arrange all observations in order of size, from smallestto largest.

2.^

If the number of observations,

n,

is odd, the median

M

is the center observation in the ordered list.

3.^

If^ n

is even, then

M

is the mean of the two center

observations in the ordered list. Note: (n+1)/2 is the location of the median, not the median

itself.

Example: Salary Survey of UNC Graduates

-^

Survey a certain number of graduates fromUNC.

-^

A lot of departments are surveyed.

-^

Question:– Which department produces students that earn the

most on average ten years after they got theirdegrees?degrees?

-^

Answer:– Geography!!!!??????

g^

y

  • Michael Jordan

Mean vs. Median

-^

Mean:

t^

l^

l t

  • easy to calculate– easy to work with algebraically– highly affected by outliers– highly affected by outliers– Not a resistant measure -^

Median:Median:– can be time consuming to calculate– more resistant to a few extreme observations

(sometimes outliers)

  • robust

Mean, Median and Mode

•^

If the (unimodal) distribution is exactly symmetric, themean the median and the mode are exactly themean, the median and the mode are exactly thesame.

-^

If the distribution is skewed, the three measuresdiffer.

Mean Median Mode

Mean

Median

Mode

Which one to use?

-^

Different by definition– Mean and median are unique, and only for

q^

y

quantitative variables.

  • Mode is not unique.– Mode is defined for categorical variables also.

g

-^

The choice depends on the shape of thedistribution the type of data and the purpose ofdistribution, the type of data and the purpose ofyour study– Skewed: median– Categorical: mode– Total quantity: mean– …

Handling Outliers

  • Detect it using graphical and numerical

methodsmethods.

  • Check the data to make sure correct entry.• Reducing influence of outlier
    • delete the observation (BE CAREFUL!)

(^

  • Use transformations, robust methods.

Speed of Light (Histogram)

Why do we need “Spread”?

  • Knowing the center of a distribution alone

is not a good enough description of theis not a good enough description of thedata.– Two basketball players with the same

Two basketball players with the sameshooting percentage may be very different interms of consistency.

  • Two companies may have the same average

salary, but very different distributions.

W

d t

k^

th

d^

th

  • We need to know the spread, or the

variability of the values.

A raw measure: Range

  • Range = maximum - minimum

D

d^

l^

l

  • Depends only on two values• Tends to increase with larger samples• Affected by outliers
    • Not robust

Not robust