Upload
allen-morrison
View
212
Download
0
Embed Size (px)
Citation preview
Descriptive Statistics II:By the end of this class you should be able to:
• describe the meaning of and calculate the mean and standard deviation of a sample
• estimate normal proportions based on mean and standard deviation
• plot a histograms with alternative scaling
Palm: Section 7.1, 7.2
please download cordbreak1.mat & FWtemperature.txt
Exercise
• Download FWTemperature.txt• Read into MATLAB• Prepare a single figure with two plots
– a histogram of March highs (row 2)– a histogram of April highs (row 4)
• Label these plots fully • Print out the your commands and the
resulting figure
Review: Quantifying Variation
1
)(1
2
n
xxs
n
ii
x
n
xx
n
ii
1
Mean
Central Tendency
>> mean(x)
Standard Deviation
Spread
>> std(x)difference deviation of each point
about the mean
squared all values positive
Summation yields one number
Divide by n-1 normalize the sum
for based on degrees of freedom
Formula MATLAB EXCEL
Mean >> mean(variable) = average(range)
Sample Standard Deviation
>> std(variable) = stdev(range)
n
xx
n
ii
1
1
)(1
2
n
xxs
n
ii
x
-4 -3 -2 -1 0 1 2 3 40
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
standard deviations from the mean
prob
abili
ty d
ensi
ty (s
cale
d fre
quen
cy)
The Normal (Gaussian) Distribution
(Population)
StandardDeviation
Mean
Mode
Note on Sample and Population Statistics
Sample (The estimate from a sample of the whole population)
Population(The true value from the entire population)
Standard Deviation
s
Meanor m
x
s
n
as
x
Expected Proportions for known
-4 -3 -2 -1 0 1 2 3 40
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
standard deviations from the mean
prob
abili
ty d
ensi
ty (s
cale
d fre
quen
cy)
68 %
95.5 %
99.7%
Percentage of observations in the given range
1
2
3
mean
-4 -3 -2 -1 0 1 2 3 40
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
standard deviations from the mean
prob
abili
ty d
ensi
ty (s
cale
d fre
quen
cy)
68 %
Expected Proportions for known
16 %
%162
68100
Proportions Problem
Data analysis of the breaking strength of a certain fabric shows that it is normally distributed with a mean of 200 lb and a variance (2) of 9.
• Estimate the percentage of fabric samples that will have a breaking strength between 197 lb and 203 lb.
• Estimate the percentage of fabric samples that will have a breaking strength no less than 194 lb.
145 165 185 205 225 245 265 285 305 325 345 3650
1
2
3
4
5
6
7
8
9x 10
-3
Breaking Force (n)
Sca
led
Fre
quen
cyCord Breaking Distribution with Normal Curve
)2/()( 22
2
1)(
xexp
Review: Types of Histograms
Type Freq. Formula Use MatlabAbsolute Frequency
absolute count in each bin
= zfor a quick picture >> hist(x, n)
Relative Frequency
fraction of total count in each bin
compare samples when total counts differ
>> [x,z] = hist(x)>> zr = z/sum(z)>> bar(x, zr)
Scaled Frequency
fraction of total area in each bin
compare samples when bin sizes differs
>> b = bin centers>> [x,z] = hist(x,b)>> zs = z/(sum(z)*w)>> bar(x, zs)
)(zsumz
widthbinzsumz
*)(
Additional Example (not covered in class)
Looking at two sets of data • Look at a histogram of the second set of data,
‘cord2’
• How would you compare it to cord the first set of data?
• What problems do you run into?