maz jamilah masnan institute of engineering mathematics semester i 2015/16 eqt271 engineering...
TRANSCRIPT
1.1 STATISTICS IN ENGINEERING1.2 COLLETING ENGINEERING DATA1.3 DATA SUMMARY & PRESENTATION
Maz Jamilah MasnanInstitute of Engineering Mathematics
Semester I 2015/16
EQT271ENGINEERING STATISTICS
The Four Steps of Engineering Statistics
Gather
Data
• Chapter (1.1 – 1.2)
Summarize
Data
• Chapter 1 (1.3)
Analyze
Data
• Chapter 1 (1.4) – Background for analyzing data• Chapter 2• Chapter 3• Chapter 4• Chapter 5
Reporting Results
• Reporting the analyses results creatively, interestingly and easy to understand (integrated in FYP)
Methods for analyzing data
Maz Jamilah Masnan, EQT271, S2 2014/15
Basic Statistics
◦ Statistics in Engineering◦ Collecting Engineering Data◦ Data Summary and Presentation◦ Probability Distributions
- Discrete Probability Distribution- Continuous Probability Distribution
◦ Sampling Distributions of the Mean and Proportion
CHAPTER 1
Statistics In Engineering
Statistics is the area of science that deals with collection, organization, analysis, and interpretation of data.
A collection of numerical information from a population is called statistics.
Because many aspects of engineering practice involve working with data, obviously some knowledge of statistics is important to an engineer.
the methods of statistics allow scientists and engineers to design valid experiments and to draw reliable conclusions from the data they produce
• Specifically, statistical techniques can be a powerful aid in designing new products and systems, improving existing designs, and improving production process.
Basic Terms in Statistics
Population- Entire collection of subjects/individuals which are characteristic
being studied. Sample- A portion, or part of the population interest. Random Variable (X)- Characteristics of the individuals within the population. Observation- Value of variable for an element. Data Set- A collection of observation on one or more variables.
POPULATION
SAMPLE
X
Example An engineer is developing a rubber
compound for use in O-rings. The engineer uses the standard
rubber compound to produce eight O-rings in a development laboratory and measures the tensile strength of each specimen.
The tensile strengths (in psi) of the eight O-rings
1030,1035,1020, 1049, 1028, 1026, 1019, and 1010.
Variable
Sample
Observation
Variability There is variability in the tensile strength
measurements.◦ The variability may even arise from the
measurement errors Tensile Strength can be modeled as a
random variable. Tests on the initial specimens show that
the average tensile strength is 1027.1 psi. The engineer thinks that this may be too
low for the intended applications. He decides to consider a modified
formulation of rubber in which a Teflon additive is included.
Statistical thinking
Statistical methods are used to help us describe and understand variability.
By variability, we mean that successive observations of a system or phenomenon do not produce exactly the same result.
Are these gears produced exactly the same size?
NO!
Man
Environment
Method
Material
Machine
Sources of variability
Collecting Engineering Data
Direct observationThe simplest method of obtaining data.Advantage: relatively inexpensive.Disadvantage: difficult to produce useful information since it does not consider all aspects regarding the issues.
ExperimentsMore expensive methods but better way to produce data.Data produced are called experimental data.
SurveysMost familiar methods of data collectionDepends on the response rate
Personal InterviewHas the advantage of having higher expected response rateFewer incorrect respondents.
Type of data
Classification for its measurement scale:◦ Qualititative
- Binary - dichotomous- Ordinal- Nominal
◦ Quantitative- Discrete A variable whose values are countable, can assume
only certain values with no intermediate values.- Continuous A variable that can assume any numerical value
over a certain interval or intervals.
Type of data - Examples Qualitative
◦ Dichotomous - binary- Gender: male or female.- Employment status: employment or without employment.
◦ Ordinal- Socioeconomic level: high, medium, low.
◦ Nominal- Residency place: center, North, South, East, West.- Civil status: single, married, widowed, divorced, free
union. Quantitative
◦ Discrete- Number of offspring, number of houses, cars accidents :
1,2,3,4, ... ◦ Continuous
- Glucose in blood level: 110 mg/dl, 145 mg/dl.- length, age, height, weight, time
SOURCES OF DATA
Primary Data(data collected
by the researcher)
Examples:-i. Personal Interviewii. Telephone Interviewiii. Questionnaireiv. Observations
Secondary Data(already collected/
published by someone else)
Examples:- From books, magazines,
annual report, internet
Data summary
Generally, we want to show the data in a summary form.
Number of times that an event occur, is of our interest, it show us the variable distribution.
We can generate a frequency list quantitative or qualitative.
Grouped Data Vs Ungrouped Data
Grouped data - Data that has been organized into groups (into a frequency distribution).
Ungrouped data - Data that has not been organized into groups. Also called as raw data.
1030,1035,1020, 1049, 1028, 1026, 1019, and 1010.
Age (years) n %
<1 - 3 52 13.20
4 - 6 132 33.50
6 - 9 131 33.25
10 - 12 61 15.48
13 - 15 18 4.57
Total 394 100.00
POPULATION
SAMPLE
Random variable (X)
STATISTICS
Descriptive Statistics
Inferential Statistics
Graphically
Numerically
1. Tabular2. Chart/
graph
1. Measure of Central Tendency2. Measure of Dispersion3. Measure of Position
Maz Jamilah Masnan, S2 2014/15
Graphically data presentation
Graphical Data Presentation
Data can be summarized or presented in two ways:1. Tabular2. Charts/graphs.
The presentations usually depends on the type (nature) of data whether the data is in qualitative (such as gender and ethnic group) or quantitative (such as income and CGPA).
Data Presentation of Qualitative Data
Tabular presentation for qualitative data is usually in the form of frequency table that is a table represents the number of times the observation occurs in the data.*Qualitative :- characteristic being studied is nonnumeric. Examples:- gender, religious affiliation or eye color.
The most popular charts for qualitative data are:1. bar chart/column chart;2. pie chart; and3. line chart.
Types of Graph for Qualitative Data
Civil status of women in a community
Single28%
Married44%
Divorced11%
Widowed8%
Free union9%
Example 1.1:frequency table
Bar Chart: used to display the frequency distribution in the graphical form.
Example 1.2:
Observation FrequencyMalay 33Chinese9Indian 6Others 2
Pie Chart: used to display the frequency distribution. It displays the ratio of the observations
Example 1.3 :
Line chart: used to display the trend of observations. It is a very popular display for the data which represent time.
Example 1.4
Malay
Chinese
Indian
Others
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec10 7 5 10 39 7 260 316 142 11 4 9
Data Presentation Of Quantitative Data
Tabular presentation for quantitative data is usually in the form of frequency distribution that is atable represent the frequency of the observation that fall inside some specific classes (intervals).
*Quantitative : variable studied are numerically. Examples:- balanced in accounts, ages of students, the life of an automobiles batteries such as 42 months).
Frequency distribution: A grouping of data into mutually exclusive classes showing the number of observations in each class.
There are few graphs available for the graphical presentation of the quantitative data. The most popular graphs are:1. histogram;2. frequency polygon; and3. ogive.
Example 1.5: Frequency Distribution Weight (Rounded decimal point) Frequency
60-62 563-65 1866-68 4269-71 2772-74 8
Histogram: Looks like the bar chart except thatthe horizontal axis represent the data whichis quantitative in nature. There is no gap betweenthe bars.
Example 1.6:
Frequency Polygon: looks like the line chart except that the horizontal axis represent the class mark of the data which is quantitative in nature.
Example 1.7 :
Ogive: line graph with the horizontal axis represent the upper limit of the class interval while the vertical axis represent the cummulative frequencies.
Example 1.8 :
POPULATION
SAMPLE
Random variable (X)
STATISTICS
Descriptive Statistics
Inferential Statistics
Graphically
Numerically
1. Tabular2. Chart/
graph
1. Measure of Central Tendency2. Measure of Dispersion3. Measure of Position
Maz Jamilah Masnan, S2 2014/15
NUMERICALLY SUMMARIZING DATA
Constructing Frequency Distribution When summarizing large quantities of raw data, it is
often useful to distribute the data into classes. Table 1.1 shows that the number of classes for Students` weight.
A frequency distribution for quantitative data lists all the classes and the number of values that belong to each class.
Data presented in the form of a frequency distribution are called grouped data.
WeightFrequenc
y60-62 563-65 1866-68 4269-71 2772-74 8Total 100
Table 1.1: Weight of 100 male students in XYZ university
For quantitative data, an interval that includes all the values that fall within two numbers; the lower and upper class which is called class.
Class is in first column for frequency distribution table.*Classes always represent a variable, non-overlapping; each value is belong to one and only one class.
The numbers listed in second column are called frequencies, which gives the number of values that belong to different classes. Frequencies denoted by f.
Weight Frequency60-62 563-65 1866-68 4269-71 2772-74 8Total 100
Variable Frequencycolumn
Third class (Interval Class)
Lower Limit of the fifth class
Frequencyof the third class.
Upper limit of the fifth class
Table 1.2 : Weight of 100 male students in XYZ university
The class boundary is given by the midpoint of the upper limit of one class and the lower limit of the next class.
The difference between the two boundaries of a class gives the class width; also called class size.
Formula:- Class Midpoint or MarkClass midpoint or mark = (Lower Limit + Upper
Limit)/2- Finding The Number of ClassesNumber of classes, c = - Finding Class Width For Interval Classclass width , i = (Largest value – Smallest value)/Number of
classes
* Any convenient number that is equal to or less than the smallest values in the data set can be used as the lower limit of the first class.
1 3.3log n
60 62 6362.559.5
Example 1.9:From Table 1.1: Class Boundary
Weight (Class
Interval)Class
Boundary Frequency60-62 59.5-62.5 563-65 62.5-65.5 1866-68 65.5-68.5 4269-71 68.5-71.5 2772-74 71.5-74.5 8Total 100
Example 1.10:
Given a raw data as below:27 27 27 28 27 20 25 28 26 28 26 28 31 30 26 26
33 28 35 39
a) How many classes that you recommend?b) How many class interval?c) Build a frequency distribution table.d) What is the lower boundary for the first
class?
Cumulative Frequency Distributions A cumulative frequency distribution gives the total number of
values that fall below the upper boundary of each class. In cumulative frequency distribution table, each class has the
same lower limit but a different upper limit. Table 1.3: Class Limit, Class Boundaries, Class Width , Cumulative Frequency
Weight(Class
Interval)
Number of Students, f
Class Boundaries
Cumulative Frequency
60-62 5 59.5-62.55
63-65 18 62.5-65.55 + 18 = 23
66-68 42 65.5-68.523 + 42 = 65
69-71 27 68.5-71.565 + 27 =92
72-74 8 71.5-74.592 + 8 = 100
100
Exercise 1.1 :
The data below represent the waiting time (in minutes) taken by 30 customers at one local bank.25 31 20 30 22 32 37 2829 23 35 25 29 35 29 2723 32 31 32 24 35 21 3535 22 33 24 39 43
Construct a frequency distribution and cumulative frequency distribution table.
Construct a histogram.
Data summary• Measures of Central Tendency
• Measures of Dispersion• Measures of Position
Data Summary
Summary statistics are used to summarize a set of observations.
Three basic summary statistics are 1. measures of central tendency, 2. measures of dispersion, and 3. measure of position.
Measures in Statistics
Measure of Central Tendency• MEAN• MODE
• MEDIAN
Measure of Dispersion• RANGE
• VARIANCE• STANDARD DEVIATION
Measure of Position• QUARTILE• Z-SCORE
• PERCENTILE• OUTLIER
Measures of Central Tendency
MeanMean of a sample is the sum of the sample data divided by the total number sample.
Mean for ungrouped data is given by:
Mean for group data is given by:
x
n
xxornnfor
n
xxxx n
_21
_
,...,2,1,.......
f
fxor
f
xfx n
ii
n
iii
1
1
Example 1.11 (Ungrouped data):
Mean for the sets of data 3,5,2,6,5,9,5,2,8,6
Solution :
3 5 2 6 5 9 5 2 8 65.1
10x
Example 1.12 (Grouped Data):
Use the frequency distribution of weights 100 male students in XYZ university, to find the mean.
Weight Frequency
60-6263-6566-6869-7172-74
51842278
Solution :
Weight (Class
Interval
Frequency, f Class Mark, x
fx
60-6263-6566-6869-7172-74
51842278
?fx
xf
Median of ungrouped data: The median depends on the number of observations in the data, n . If n is odd, then the median is the (n+1)/2 th observation of the ordered observations. But if is even, then the median is the arithmetic mean of the n/2 th observation and the (n+1)/2 th observation.
Median of grouped data:
1
1
2
where
L = the lower class boundary of the median class
c = the size of median class interval
F the sum of frequencies of all classes lower than the median class
the fre
j
j
j
j
fF
x L cf
f
quency of the median class
Example 1.13 (Ungrouped data):
The median for data 4,6,3,1,2,5,7 is 4
Rearrange the data : 1,2,3,4,5,6,7
median
Example 1.14 (Grouped Data):The sample median for frequency distribution as in example 1.12Solution:
Weight (Class
Interval
Frequency, f
Class Mark,
x
fx Cumulative Frequency,
F
Class Boundary
60-6263-6566-6869-7172-74
51842278
6164677073
305115228141890584
12 ?j
j
fF
x L cf
Mode
Mode of ungrouped data: The value with the highest frequency in a data set.
*It is important to note that there can be more than one mode and if no number occurs more than once in the set, then there is no mode for that set of numbers
1
1 2
When data has been grouped in classes and a frequency curveis drawn
to fit the data, the mode is the value of x corresponding to the maximum
point on the curve, that is
ˆ
the lower c
x L c
L
1
2
lass boundary of the modal class
c = the size of the modal class interval
the difference between the modal class frequency and the class before it
the difference between the modal class frequency a
nd the class after it
*the class which has the highest frequency is called the modal class
Mode for grouped data
Example 1.15 (Ungrouped data)Find the mode for the sets of data 3, 5, 2, 6, 5, 9, 5, 2, 8, 6Mode = number occurring most frequently = 5
Example 1.16 Find the mode of the sample data belowSolution:
Weight (Class
Interval
Frequency, f
Class Mark
, x
fx Cumulative Frequency,
F
Class Boundary
60-6263-6566-6869-7172-74
51842278
6164677073
305115228141890584
5236592
100
59.5-62.562.5-65.565.5-68.568.5-71.571.5-74.5
Total 100 6745
Mode class
1
1 2
ˆ ?x L c
Measures of Dispersion
Range = Largest value – smallest value Variance: measures the variability (differences)
existing in a set of data.The variance for the ungrouped data:
◦ (for sample) (for population)
The variance for the grouped data:
- or (for sample)
- or (for population)
1
)( 22
n
xxS
22
2
1
fx n xS
n
22
2
( )
1
fxfx
nSn
22
2 fx n xS
n
22
2
( )fxfx
nSn
22 ( )x xS
n
A large variance means that the individual scores (data) of the sample deviate a lot from the mean.
A small variance indicates the scores (data) deviate little from the mean.
The positive square root of the variance is the standard deviation
22 2( )
1 1
x x fx n xS
n n
Example 1.17 (Ungrouped data)
Find the variance and standard deviation of the sample data : 3, 5, 2, 6, 5, 9, 5, 2, 8, 6 2
2
2
( )?
1
( )?
1
x xs
n
x xs
n
Example 1.18 (Grouped data)Find the variance and standard deviation of the sample data below:Weight (Class
Interval
Frequency, f
Class Mark,
x
fx Cumulative Frequency,
F
Class Boundary
60-6263-6566-6869-7172-74
51842278
6164677073
305115228141890584
5236592
100
59.5-62.562.5-65.565.5-68.568.5-71.571.5-74.5
Total 100 6745
2x2fx
22
2
( )
?1
fxfx
nSn
2
2
?1
fx n xS
n
Exercise 1.2
The defects from machine A for a sample of products were organized into the following:
What is the mean, median, mode, variance and standard deviation.
Defects(Class Interval)
Number of products get defect, f (frequency)
2-6 1
7-11 4
12-16 10
17-21 3
22-26 2
Exercise 1.3
The following data give the sample number of iPads sold by a mail order company on each of 30 days. (Hint : 5 number of classes)
a) Construct a frequency distribution table.b) Find the mean, variance and standard deviation,
mode and median. c) Construct a histogram.
8 25 11 15 29 22 10 5 17 21
22 13 26 16 18 12 9 26 20 16
23 14 19 23 20 16 27 9 21 14
Rules of Data DispersionBy using the mean and standard deviation, we can find the percentage of total observations that fall within the given interval about the mean.
i) Chebyshev’s TheoremAt least of the observations will be in the range of k standard deviation from mean. where k is the positive number exceed 1 or (k>1).Applicable for any distribution /not normal distribution.
Steps:1) Determine the interval2) Find value of3) Change the value in step 2 to a percent4) Write statement: at least the percent of data
found in step 3 is in the interval found in step 1
2
1(1 )
k
x
ksx2
1(1 )
k
Example 1.19 Consider a distribution of test scores that are badly skewed to the right, with a sample mean of 80 and a sample standard deviation of 5. If k=2, what is the percentage of the data fall in the interval from mean?
Solution:1) Determine interval
2) Find
3) Convert into percentage: 4) Conclusion: At least 75% of the data is found in the
interval from 70 to 90
)90,70(
)5)(2(80
ksx
4
32
11
11
2
2
k
%754
3
ii) Empirical RuleApplicable for a symmetric bell shaped distribution / normal distribution.There are 3 rules:i. 68% of the observations lie in the interval ii. 95% of the observations lie in the interval iii. 99.7% of the observations lie in the interval
Formula for k = Distance between mean and each point
standard deviation
),( sxsx
)2,2( sxsx
)3,3( sxsx
Example 1.20The age distribution of a sample of 5000 persons is bell shaped with a mean of 40 yrs and a standard deviation of 12 yrs. Determine the approximate percentage of people who are 16 to 64 yrs old. Solution:
95% of the people in the sample are 16 to 64 yrs old.
212
2412
1640
k
Measures of Position
To describe the relative position of a certain data value within the entire set of data.
z scoresPercentilesQuartilesOutliers
Z SCORE•A standard score or z score tells how many standard deviations a data value is above or below the mean for a specific distribution of values.•If a z score is 0, then the data value is the same as the mean.•The formula is:
•Note that if the z score is positive, the score is above the mean. If the z score is 0, the score is the same as the mean. And if the z score is negative, the z score is below the mean.
value-mean,
standard deviation
for samples,
for populations,
z
X Xz
s
Xz
s
xxz
x
z
σ1
σ2
σ3
Example: A student scored 65 on a calculus test that had a mean of 50 and standard deviation of 10. She scored 30 on a history test with a mean of 25 and a standard deviation of 5. Compare her relative positions on the two tests. Solution: Find the z scores. For calculus:
For history:
Since the z score for calculus is larger, her relative position in the calculus class is higher than her relative position in the history class.
65 501.5
10z
The calculus score of 65 was
actually 1.5 standard deviations above the mean 50
30 251.0
5z
The history score of 30 was
actually 1.0 standard deviations above the mean 25
Exercise:Find the z score for each test, and state which is higher.
Test X X bar S
Mathematics 38 40 5
Statistics 94 100 10
Percentiles are position measures used in educational and health-related fields to indicate the position of an individual in a group.
Percentiles
Percentiles divide the data set into 100 equal groups.
Usually used to observe growth of child (mass, height etc)
Quartiles
Divide data sets into fourths or four equal parts.
Smallest data value Q1 Q2 Q3
Largest data value
25% of data
25% of data
25% of data
25% of data
11 ( 1)
41
2 ( 1)2
33 ( 1)
4
Q x n th
Q median x n th
Q x n th
Example 1.21
Find Q1, Q2, and Q3 for the data set
15, 13, 6, 5, 12, 50, 22, 18
Solution
Step 1 Arrange the data in order.5, 6, |12, 13, | 15, 18, | 22, 50
Step 2 Find the median (Q2).5, 6, 12, 13, 15, 18, 22, 50 ↑ MD
Step 3 Find the median of the data values less than 14.5, 6, 12, 13 ↑ Q1 [So Q1 is 9.]
Step 4 Find the median of the data values greater than 14.15, 18, 22, 50 ↑ Q3 [ Q3 is 20]
Hence, Q1 =9, Q2 =14, and Q3 =20.
Outliers
Extreme observations Can occur because of the error in
measurement of a variable, during data entry or errors in sampling.
Checking for outliers by using Quartiles
Step 1: Rank the data in increasing order,Step 2: Determine the first, median and third
quartiles of data.Step 2: Compute the interquartile range (IQR).
Step 3: Determine the fences. Fences serve as cutoff
points for determining outliers.
Step 4: If data value is less than the lower fence or greater than the upper fence,
considered outlier.
3 1IQR Q Q
1
3
Lower Fence 1.5( )
Upper Fence 1.5( )
Q IQR
Q IQR
Example 1.22
Check the following data set for outliers.
5, 6, 12, 13, 15, 18, 22, 50
Solution
The data value 50 is extremely suspect. These are the steps in checking for an outlier.
Step 1 Find Q1 and Q3. This was done in Example 1.21; Q1 is 9 and Q3 is 20.
Step 2 Find the interquartile range (IQR), which is Q3 & Q1. IQR = Q3-Q1 = 20-9= 11
Step 3 Multiply this value by 1.5.
1.5(11) 16.5
Step 4 Subtract the value obtained in step 3 from Q1, and add the value obtained in step 3 to Q3.
9 -16.5=7.5 and 20+16.5=36.5
Step 5 Check the data set for any data values that fall outside the interval from 7.5 to 36.5. The value 50 is outside this interval; hence, it can be considered an outlier.
The Five Number Summary (Boxplots)
Compute the five-number summary
Example 1.24
(Based on example 1.20)Compute all five-number summary.
1 3MINIMUM Q Q MAXIMUMM
Q2
Median
Q3Q1
Minimum Maximum
1 3MINIMUM Q Q MAXIMUMM
BoxplotsStep 1: Determine the lower and upper fences:
Step 2: Draw vertical lines at .Step 3: Label the lower and upper fences.Step 4: Draw a line from to the smallest data value that is larger than the lower fence. Draw a line from to the largest data value that is smaller
than the upper fence.Step 5: Any data value less than the lower fence or greater than the upper fence are outliers and
mark (*).
1
3
Lower Fence 1.5( )
Upper Fence 1.5( )
Q IQR
Q IQR
1 3, and Q M Q
3Q
1Q
Example 1.23
(Based on example 1.21)Construct a boxplot.
BoxplotsStep 1: Rank the data in increasing order.Step 2: Determine the quartiles and median.Step 3: Draw vertical lines at .Step 4: Draw a line from to the smallest data
value. Draw a line from to the largest data value.
Step 5: Any data value less than the lower fence or greater
than the upper fence are outliers and mark (*).
1 3, and Q M Q
1Q
3Q
SolutionStep 1 Arrange the data in order.5, 6, |12, 13, | 15, 18, | 22, 50
Step 2 Find the median (Q2).5, 6, 12, 13, 15, 18, 22, 50 ↑ MD [Q2=(13+15)/2=14]
Step 3 Find the median of the data values less than 14.5, 6, 12, 13 ↑ Q1 [So Q1 is 9.]
Step 4 Find the median of the data values greater than 14.15, 18, 22, 50 ↑ Q3 [ Q3 is 20]
Step 5 Draw a scale for the data on the x axis.Step 6 Locate the lowest value, Q1, median, Q3, and the highest value on the scale.Step 7 Draw a box around Q1 and Q3, draw a vertical line through the median, and connect the upper value and the lower value to the box.
Q2
=14
Q3
=
20
Q1
=
9
Min = 5 Max = 50
A right skewed distribution / positive skewed
1
3
Lower Fence 1.5( )
Upper Fence 1.5( )
Q IQR
Q IQR
Lower Fence = 9 -16.5=7.5 Upper Fence = 20+16.5=36.5
Rules of Data Dispersion By using the mean and standard deviation,
we can find the percentage of total observations that fall within the given interval about the mean.
Rules of Data Dispersion
Empirical RuleChebyshev’s Theorem
(IMPORTANT TERM: AT LEAST)
Empirical Rule
Applicable for a symmetric bell shaped distribution / normal distribution.There are 3 rules:i. 68% of the observations lie in the interval
(mean ±SD)ii. 95% of the observations lie in the interval
(mean ±2SD)iii. 99.7% of the observations lie in the interval
(mean ±3SD)
Empirical Rule
Boxplot
1
3
Lower Fence 1.5( )
Upper Fence 1.5( )
Q IQR
Q IQR
3 1IQR Q Q
Boxplot