Basic Statistics Statistics in Engineering Collecting Engineering Data Data Summary and...

55
Basic Statistics Statistics in Engineering Collecting Engineering Data Data Summary and Presentation Probability Distributions - Discrete Probability Distribution - Continuous Probability Distribution

Transcript of Basic Statistics Statistics in Engineering Collecting Engineering Data Data Summary and...

Page 1: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Basic Statistics

Statistics in EngineeringCollecting Engineering DataData Summary and PresentationProbability Distributions

- Discrete Probability Distribution- Continuous Probability Distribution

Page 2: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Statistics In Engineering

Statistics is the area of science that deals with collection, organization, analysis, and interpretation of data.

A collection of numerical information is called statistics.

Because many aspects of engineering practice involve working with data, obviously some knowledge of statistics is important to an engineer.

Page 3: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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.

Page 4: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Basic Terms in Statistics

Population- Entire collection of individuals which are characteristic being

studied. Sample- A portion, or part of the population interest. Variable- 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.

Page 5: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Collecting Engineering Data

Direct observationThe simplest method of obtaining data.Advantage: relatively inexpensiveDisadvantage: difficult to produce useful information since it does not consider all aspects regarding the issues.

ExperimentsMore expensive methods but better way to produce dataData produced are called experimental

Page 6: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

SurveysMost familiar methods of data collectionDepends on the response rate

Personal InterviewHas the advantage of having higher expected response rateFewer incorrect respondents.

Page 7: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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.

Page 8: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.
Page 9: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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).

Page 10: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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.

Page 11: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Types of Graph Qualitative Data

Page 12: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 13: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec10 7 5 10 39 7 260 316 142 11 4 9

Page 14: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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.

Page 15: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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.

Page 16: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Example 1.5: Frequency Distribution Weight (Rounded decimal point) Frequency

60-62 5

63-65 18

66-68 42

69-71 27

72-74 8 Histogram: Looks like the bar chart except that

the horizontal axis represent the data whichis quantitative in nature. There is no gap betweenthe bars.

Example 1.6:

Page 17: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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 :

Page 18: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.
Page 19: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 20: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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 fifthclass

Table 1.2 : Weight of 100 male students in XYZ university

Page 21: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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.

Page 22: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Formula:- Class Midpoint or Mark Class midpoint or mark = (Lower Limit + Upper

Limit)/2- Finding The Number of Classes Number of classes, i = - Finding Class Width For Interval Class class width , c = (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

Page 23: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 24: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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?

Page 25: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Interva;)

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

Page 26: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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.

Page 27: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

• Measures of Central Tendency•Measures of Dispersion

•Measures of Position

Page 28: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Data SummarySummary statistics are used to summarize a set of observations.

Two basic summary statistics are measures of central tendency and measures of dispersion.

Measures of Central Tendency Mean Median Mode

Measures of Dispersion Range Variance Standard deviation

Measures of Position Z scores Percentiles Quartiles Outliers

Page 29: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 30: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 31: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 32: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Solution :

Weight (Class

Interval

Frequency, f Class Mark, x

fx

60-6263-6566-6869-7172-74

51842278

?fx

xf

Page 33: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 34: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Single middle value

Averages (The Median)

The median is the middle value of a set of data once the data has been ordered.

Example 1.13 (a). Ali hit 11 balls in a golf tournament. The recorded distances of his drives, measured in yards, are given below. Find the median distance for his drives.

85, 125, 130, 65, 100, 70, 75, 50, 140, 95, 70

Median drives = 85 yards

50, 65, 70, 70, 75, 85, 95, 100, 125, 130, 140

Ordered data

Page 35: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Two middle values so take the mean.

Averages (The Median)

The median is the middle value of a set of data once the data has been ordered.

Example 1.13 (b). Ali hit 12 balls at golf tournament. The recorded distances of his drives, measured in yards, are given below. Find the median distance for his drives.

85, 125, 130, 65, 100, 70, 75, 50, 140, 135, 95, 70

Median drive = 90 yards

50, 65, 70, 70, 75, 85, 95, 100, 125, 130, 135, 140

Ordered data

Page 36: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 37: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.
Page 38: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 39: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 40: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 41: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 42: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

22

2

( )?

1

( )?

1

x xs

n

x xs

n

Page 43: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 44: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 45: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 46: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Normal Data SetsA data set is said to be normal if a histogram describing it has the following properties:It is the highest at the middle interval.Moving from the middle interval in either direction, the height decreases in such a way that the entire histogram is bell-shaped.The histogram is symmetric about its middle interval.

Page 47: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Measures of Position

To describe the relative position of a certain data value within the entire set of data.

z scores Percentiles Quartiles Outliers

Page 48: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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

Page 49: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Example 1.21The following data are the incomes (in

thousand of dollars) for a sample of 12 households. Find the quartiles.

35 29 44 72 34 64 4150 54 104 39 58

Page 50: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Outliers

Extreme observations Can occur because of the error in

measurement of a variable, during data entry or errors in sampling.

Page 51: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

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 3: Compute the interquartile range (IQR).

Step 4: Determine the fences. Fences serve as cutoff points for determining outliers.

Step 5: 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

Page 52: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Finding the median, quartiles and inter-quartile range.

12, 6, 4, 9, 8, 4, 9, 8, 5, 9, 8, 10

4, 4, 5, 6, 8, 8, 8, 9, 9, 9, 10, 12

Order the data

Inter-Quartile Range = 9 - 5½ = 3½

Example 1.24: Find the median and quartiles for the data below.

Lower Quartile = 5½

Q1

Upper Quartile = 9

Q3

Median = 8

Q2

Page 53: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Upper Quartile = 10

Q3

Lower Quartile = 4

Q1

Median = 8

Q2

3, 4, 4, 6, 8, 8, 8, 9, 10, 10, 15,

Finding the median, quartiles and inter-quartile range.

6, 3, 9, 8, 4, 10, 8, 4, 15, 8, 10 Order the data

Inter-Quartile Range = 10 - 4 = 6

Example 2: Find the median and quartiles for the data below.

Page 54: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

Example 1.22(Based on example 1.21)Determine whether there are outliers in the

data set.

Page 55: Basic Statistics  Statistics in Engineering  Collecting Engineering Data  Data Summary and Presentation  Probability Distributions - Discrete Probability.

2, 5, 6, 6, 7, 8, 8, 8, 9, 9, 10, 15

Median = 8 hours and the inter-quartile range = 9 – 6 = 3 hours.

Battery Life: The life of 12 batteries recorded in hours is:

2, 5, 6, 6, 7, 8, 8, 8, 9, 9, 10, 15

Mean = 93/12 = 7.75 hours and the range = 15 – 2 = 13 hours.

Discuss the calculations below.

The averages are similar but the measures of spread are significantly different since the extreme values of 2 and 15 are not included in the inter-quartile range.