Uploaded by George Paschakis

2T1

advertisement
Unit 2:
Engineering Maths
Unit code
Unit level
Credit value
M/615/ 1476
4
15
LEARNING OUTCOME 2
TUTORIAL 1 – STATISTICS REVISION
LO2 Investigate applications of statistical techniques to interpret, organise and present data,
by using appropriate computer software packages
Summary of data:
Mean and standard deviation of grouped data
Pearson’s correlation coefficient
Linear regression
Probability theory:
Binomial and normal distribution
This tutorial is revision of the work you should have done at national level. You may skip it if you
are familiar with the basics.
CONTENTS
1. Introduction
2. Sample Values
3. Raw Data
4. Bands
5. Plots
6. Mean
7. Median
8. Ogive
9. Quartiles and Percentiles
© D.J.Dunn www.freestudy.co.uk
1
1. INTRODUCTION
Statistics are used to help us analyse and understand the performance and trends in various areas of
work. These might be financial trends, things to do with the population or things to do with
manufacturing.
2.
SAMPLE VALUES
The samples are taken from a Population and the samples form a Set within that population. For
example a set of 100 people might be taken from a population of 1000 000. The samples must be
truly random with no factors to bias the results to one extreme or the other. If the set is large enough
and truly random then we might expect any information we get to apply equally well to the larger
population.
The data collected will vary about a mean or average value. The data is a variable such as the height
of people, the values of resistors coming off a production line or the diameter of a machined
component coming off a machine tool. We find out how many of these things ‘f’ fall within defined
bands (also called bins in modern statistics) and these are simply ranges of values denoted ‘x’.
We need to discuss what ‘x’ means. If you were throwing a dice over and over again you would get
a score of exactly 1, 2, 3, 4, 5 or 6. Hence ‘x’ can only be these exact numbers and if you throw the
dice repeatedly you can measure how many times a particular number comes up. This kind of data
is called a Discrete data set because the result can only be a whole number and this is easier to deal
with.
In the case of variables such as height, weight, size and so on, the values of ‘x’ is a Continuous
Variable and will be a decimal number and depends on the accuracy of measurement. In the
extreme we would get one sample for each exact decimal value and this would be no use. We could
do one of two things. We could round off the values so that all those close together will be counted
as the same, or we could count the number of samples ‘f’ that fall within a specified range with ‘x’
being the value at the middle of the range. Let’s use an example to get started.
3. RAW DATA
Consider a set of statistics compiled for the height of children of age 10. First we would compile a
table of heights. This would be the raw data. Note that the larger the sample we take, the more
meaningful the results will be. By measuring the heights to an accuracy of 0.01 m we may get
children with the same height but this is unlikely with a small set. This is the table of raw data for
10 year old children
Sample
Height (m)
Sample
Height (m)
1
1.45
13
1.56
2
1.56
14
1.28
3
1.37
15
1.35
4
1.44
16
1.62
5
1.32
17
1.46
6
1.42
7
1.55
8
1.29
9
1.37
10
1.49
11
1.47
12
1.34
4. BANDS
If we used more accurate the measurements it is unlikely we would find two children exactly the
same height but the more we round off the values, the more likely it becomes. When handling large
numbers of samples, we need to simplify the table by creating sensible bands within which the
measurements fall. The number of children within each band is the frequency. Next we would have
to go through the laborious task of counting how many there are in each band. If we found a child
with a height exactly on the edge of the band edge, we might decide to allocate a half to each band
on either side.
© D. J. Dunn www.freestudy.co.uk
2
This results in frequency values that are not whole numbers. The result is a Frequency Distribution
Table.
Height
Mid Point
Freq.
1.2 - 1.3
1.25
2
1.3 - 1.4
1.35
5
1.4 - 1.5
1.45
6
1.5 - 1.6
1.55
3
1.6 - 1.7
1.65
1
5. PLOTS
If we plot frequency vertically against height horizontally, we get a frequency distribution graph
and this can be drawn in different ways. Notice that the points are drawn for the middle of the band.
Histograms are another way of plotting data.
The histogram is made of vertical columns and
the area of the columns represents the
frequency. The vertical height is the frequency
density. The horizontal divisions are commonly
known as Bins. In our example the bins are all
equal and have a width of 0.1 m. The height of
each column is hence the frequency divided by
the bin so the first column is 2  0.1 = 20, the
next is 5 0.1 = 50 and so on.
You will find many examples that plot the
frequency vertically and not the frequency
density. If you do this it is a bar chart and not a
histogram.
6.
MEAN
This is one of the more common statistics you will see and it's easy to compute. All you have to do
is add up all the values in a set of data and then divide that sum by the number of values in the
dataset. For our example, let the height be represented by the variable x and the frequency be f.
Sample
number
Height (m)
1
2
3
4
5
6
7
8
9
10
11
12
13
1.45 1.56 1.37 1.44 1.32 1.42 1.55 1.29 1.37 1.49 1.47 1.34 1.56
Sample number 14
15
16
17
Total
Height (m)
1.28 1.35 1.62 1.46 24.34
© D. J. Dunn www.freestudy.co.uk
3
The mean value is denoted
and
= 24.34/17 = 1.432 m
We can do this a bit more simply using the grouped frequency distribution table but this is only an
approximation.
x (mid pt) 1.25 1.35 1.45 1.55 1.65
f.
2
5
6
3
1
total
fx
2.5 6.75 8.7 4.65 1.65 24.25
The mean value is = 24.25/17 = 1.426 m. This is not quite as accurate as the previous answer
because the values have been taken at the midpoint of the band.
7. MEDIAN
While the mean or average is a useful statistic it is also useful to know the median value. This is
easy to determine because the median is literally the value in the middle. If the data is evenly spread
about the mean value then the median is going to be similar to it. If the data is lop sided then the
median and mean will be quite different and this tells us useful things. For example if the mean is
much larger than the median we have a lot of tall children. If the median is larger than the mean
then we have a lot of short ones. In order to find it, you just line up the values in your set of data
from largest to smallest. The one in the dead-centre is your median. Our table would look like this.
Sample number
Height
(m)
1
2
3
4
5
6
7
8
9
10
11
12
13
1.28 1.29 1.32 1.34 1.35 1.37 1.37 1.44 1.44 1.46 1.46 1.47 1.49
Sample number
Height
(m)
14
15
16
17
Total
1.55 1.56 1.56 1.62 24.34
The midpoint in the table is point number 9 with so the median value is 1.44 m. If we had an even
number of samples, say 18, then there would be two values in the middle and we should average the
two to get the median.
To do it mathematically a method that works for any number of samples n is (n+1)/2 and this gives
the position of the median. In our example we have 17 results. The median is at the (17+1)/2 = 9 th
result. This works for an odd or even number of results.
We can also use the grouped frequency distribution table when dealing with a lot of data but there
are problems with this kind of data when the data is continuous and not discrete (meaning only
whole numbers).
X (mid pt) 1.25 1.35 1.45 1.55 1.65
f.
2
5
6
3
1
total
fx
2.5 6.75 8.7 4.65 1.65 24.25
Point number 9 is between 1.35 and 1.45 and we can’t say it is one or the other.
We can show this with a graph called an OGIVE.
© D. J. Dunn www.freestudy.co.uk
4
8.
OGIVE
This is another way of plotting the data with the cumulative frequency plotted vertical. For a small
number of samples we can plot the raw table against sample number. In effect this is using bands of
0.01 m and the sample number becomes the accumulative frequency.
For large amounts of data we need the grouped frequency table and we add a new row containing
the cumulative frequency as shown.
x
f.
fx
cum. f
1.25
2
2.5
2
1.35
5
6.75
7
1.45
6
8.7
13
1.55
3
4.65
16
1.65 Total
1
17 = n
1.65 24.25
17
If the graph is to have any meaning, we must plot the upper edge of the band or bin so that the point
indicates how many are less than that value. The first point must be at zero. The red plot is the
grouped frequency and the blue is the ungrouped. The median at point 9 is almost the same.
The ninth sample divides the ogives into two vertically and the projection down to the x axis gives
the median value as 1.44. Examining the graph we see that the banded data plot does not correlate
perfectly with the un-banded plot that gives us the correct median.
© D. J. Dunn www.freestudy.co.uk
5
9. QUARTILES and PERCENTILES
If we divide the vertical scale into 4 equal parts (each 4.5 in this case) and project the lines down to
the x axis we have 4 divisions on the x axis. Q1 is the first or lower Quartile and represents the
median value (height) of the first quarter. In this case it is around 1.34. Q2 is the median for the
whole range. Q3 is the median for the last quarter or Upper Quartile and is around 1.52.
The inter-quartile range is the difference between Q1 and Q2 (1.52 – 1.34 = 0.18)
These tell us something about how the samples are spread around the median but a better method of
doing this is to use the standard deviation.
If we repeated the process by dividing the vertical axis into 100 parts, then we can look up how
many children have a height less than a given percentage. These are called the PERCENTILES. The
median is the 50th percentile. The first quartile is the 25th percentile.
© D. J. Dunn www.freestudy.co.uk
6
WORKED EXAMPLE No. 1
A company manufactures steel bars of nominal diameter 20 mm and cuts them into equal
lengths. The diameter of each length is measured at the middle for the purpose of quality
control. The results for 20 bars are given below.





Produce a frequency distribution table using bands of 0.1 mm.
Calculate the mean of the samples.
Draw a histogram.
Plot the Ogive.
Determine the median, the upper and lower quartiles and the semi- inter-quartile.
Use the tables and plots to show your solutions
Sample
diameter
1
19.9
2
19.8
3
20.1
4
19.9
5
19.7
6
20.1
7
20.0
8
19.6
9
19.7
10
20.1
Sample
diameter
11
20.2
12
20.0
13
19.9
14
19.8
15
20.1
16
20.0
17
19.7
18
19.6
19
19.9
20
20.2
SOLUTION
Total = 398.3
Total samples n = 20
Rank the data in order smallest to largest.
mean = 398.3/20=19.915
Sample
diameter
1
19.6
2
19.6
3
19.7
4
19.7
5
19.7
6
19.8
7
19.8
8
19.9
9
19.9
10
19.9
Sample
diameter
11
19.9
12
20.0
13
20.0
14
20.0
15
20.1
16
20.1
17
20.1
18
20.1
19
20.2
20
20.2
n =20
Mean = 398.3/20=19.915
The Median is at (n+1)/2 = (20+1)/2 = 10.5 so it is between 10 and 11. Average of these is 19.9
so the median is 19.9
FREQUENCY DISTRIBUTION TABLE
Bin width is 0.1
d
19.55 – 19.65 19.65- 19.75- 19.85Mid
19.6
19.7 19.8
19.9
f
2
3
2
4
fd
39.2
59.1 39.6
79.6
cum.f
2
5
7
11
19.9520
3
60
14
20.0520.1
4
80.4
18
20.15- 20.25
20.2
2
40.4
20
f Den
30
40
20
20
30
20
40
Totals
20
398.3
© D. J. Dunn www.freestudy.co.uk
7
median = 19.92 Upper quartile = 20.07
Inter-quartile range =
Lower quartile = 19.75
20.07 – 19.75 = 0.22 Semi-inter-quartile = 0.22/2 = 0.11
© D. J. Dunn www.freestudy.co.uk
8
SELF ASSESSMENT EXERCISE No.1
The diameters of a number of components are measured to the nearest 0.05 mm. These are
grouped into bins of 0.1 mm as shown.
Diameter mm 9.55-9.65 9.65- 9.75- 9.85- 9.95- 10.05- 10.15- 10.25- 10.35-10.45
Number
3
9
36
88
122 90
44
7
1
Draw the histogram and the Ogive and deduce the mean, the median, the upper and lower
quartile and the semi-interquartile range.
Answers
Mean = 10.001 mm
Median is 10
upper quartile Q3 = 10.09
lower quartile Q1= 9.91
semi-interquartile range = 10.09 – 9.91 = 0.18
© D. J. Dunn www.freestudy.co.uk
9
Download