You are on page 1of 19

Supported

Self
Statistics

Study
in

Mathematics
Lesson 4 - Linear Coding

Linear Coding Contents


Linear coding to find the mean Linear Coding to find the standard deviation Work References

Linear Coding
Lets begin by looking at the data listed below

Mean

4610

4612

4614

4616

4618

4620

Imagine that you were given the task of finding the mean of this set of numbers. The method that you would probably use would be as follows mean = ( 4610 + 4612 + 4614 + 4616 + 4618 + 4620 ) = 27690 = 4615 6 6

Quite an easy task really, but now imagine that you were asked to do the calculation in your head ! Unless you had an extremely good head for figures you would have to find a way to try to simplify the problem

Linear Coding
Lets look at the data again Now we subtract 4610 from each number

Mean
x 4610 4612 4614 4616 4618 y = x - 4610 0 2 4 6 8

4620

10

Now we can find the mean of these remainders by adding them together and dividing by 6 mean = ( 0 + 2 + 4 + 6 + 8 + 10 ) = 6 30 = 5 6

Finally we add the 5 to the 4610 giving us a final mean of 4615 as before

Linear Coding

Mean

This method works well if you can find a suitable code which will help you to simplify the numbers. In this case y = x - 4610 was a suitable code but you could have chosen another. For instance what would happen if we had chosen 4614 as the code ? Well lets see. Now we need to subtract 4614 from each number and as before find the mean of the remainders mean = ( -4 + -2 + 0 + 2 + 4 + 6 ) = 6 = 1 6 6

x 4610 4612

y = x - 4614 -4 -2

4614
4616 4618 4620

0
2 4 6

and then add together 4614 and 1 to once again give a final mean of 4615

Linear Coding
Now lets look at a problem involving grouped data

Mean

The table below shows the times taken on 30 consecutive days for a coach to complete one journey on a particular route. We want to calculate the mean time for a journey using a method of coding.

Time (minutes) 60 - 63 64 - 67 68 - 71 72 - 75 76 - 79

mid-points 61.5 65.5 69.5 73.5 77.5

Frequency 1 3 12 10 4

We now need to select a suitable code which will help us to calculate the mean

Linear Coding
Time (minutes)

In this instance we are going to begin to create our code by selecting 69.5 and subtracting it from the mid-points mid-points y = x - 69.5 y = x - 69.5 4 -2 -1 0 1 2

Mean
Frequency (f) 1 3 12 10 4

60 - 63
64 - 67 68 - 71 72 - 75 76 - 79

61.5
65.5 69.5 73.5 77.5

-8
-4 0 4 8

And to further simplify the numbers we can divide by 4 making the code that we are going to use y = x - 69.5 4 Re-arranging this gives us x = 4y + 69.5 giving x = 4y + 69.5

Linear Coding
Now from the table we find the following results fy = 13

Mean

f = 30
giving y = 0.43 Now substituting this value for y into the equation we find

x = 4y + 69.5
x = 4 0.43 + 69.5 = 71.2 Hence the mean time for the journey was 71.2 minutes

Linear Coding - Worked Example 1

Mean

The set of data tabulated below shows the weights (in gm) of a random selection of letters. Using a method of coding calculate the mean weight of the letters

We will begin by selecting any one of the weights and subtracting it from all the other weights to arrive at a set of remainders Lets pick 316

Weight (gm) 304 308 312 316 320 324

Frequency (f) 1 5 9 4 4 2

Linear Coding - Worked Example 1


Weight (gm) 304 y = x - 316 -12 Frequency (f) 1

Mean
fy -12 -40 -36 0 16 16

308
312 316 320

-8
-4 0 4

5
9 4 4

324

fy = -56 f = 25 giving y = -2.24 Hence mean x = 316 + y = 316 - 2.24 = 313.76 gms.

Linear Coding - Worked Example 2

Mean

In a Biology class students timed how long it took for a sample of their saliva to break down a 2% starch solution. The times to the nearest second are shown below. Using a method of coding calculate the mean time. Firstly we need to calculate the mid-points of the time data

Time (seconds) 11 - 20

Mid-points 15.5

Frequency (f) 1

21 - 30
31 - 40 41 - 50 51 - 60

25.5
35.5 45.5 55.5

2
5 11 8

61 - 70
71 - 80

65.5
75.5

2
1

Then we need to select a suitable mid-point. Lets pick 45.5

Linear Coding - Worked Example 2

Mean

Time (seconds)

mid-pts

y = x - 45.5

y = x - 45.5 10

Frequency (f) 1 2 5 11 8 2 1

fy

11 - 20 21 - 30 31 - 40 41 - 50 51 - 60 61 - 70 71 - 80

15.5 25.5 35.5 45.5 55.5 65.5 80.5

- 30 -20 -10 0 10 20 35

-3 -2 -1 0 1 2 3.5

-3 -4 -5 0 8 4 3.5

The coding to be used for this problem is

y = x - 45.5 10

Linear Coding - Worked Example 2

Mean

fy = 3.5

f = 30
giving y = 0.116

Now x = 10y + 45.5

so the mean x = 10 0.116 + 45.5


= 46.66 secs.

Linear Coding
As with the mean, standard deviation can also be found simply by extending your calculations Fundamentally you will need to add to your table a calculation for fy2.

Standard Deviation

Lets look at some of the calculations that we made in previous examples and extend them to find a value for the standard deviation

Linear Coding
The table below shows the times taken on 30 consecutive days for a coach to complete one journey on a particular route. We want to calculate the standard deviation for the time taken for a journey using a method of coding. Time (minutes) 60 - 63 64 - 67 68 - 71 72 - 75 76 - 79 mid-points 61.5 65.5 69.5 73.5 77.5

Standard Deviation

Frequency 1 3 12 10 4

We have already seen that we can find a value for the mean by using the coding formula shown here
Re-arranging this gives us x = 4y + 69.5 and sdx = 4sdy

y = x - 69.5
4

Linear Coding
Our table now needs to be extended to contain values for fy2 Time (mins) 60 - 63 64 - 67 68 - 71 72 - 75 76 - 79 mid-pts 61.5 65.5 69.5 73.5 77.5 y = x - 69.5 -8 -4 0 4 8 y = x - 69.5 Frequency

Standard Deviation

4 -2
-1 0 1 2

(f) 1
3 12 10 4

fy -2 -3 0 10 8

fy2 4 3 0 10 16 fy2 = 33

Now (sdy)2 = 33 - (0.43)2 = > sdy = 0.957

30

And sdx = 4 sdy = 4 0.957 = 3.82 mins.

Linear Coding - Worked Example 1

Standard Deviation

In a Biology class students timed how long it took for a sample of their saliva to break down a 2% starch solution. The times to the nearest second are shown below. Using a method of coding calculate the standard deviation for the time.
Time (secs) mid-pts y = x - 45.5 y = x - 45.5 10 11 - 20 15.5 - 30 -3

(f) 1

fy -3

fy2 9

21 - 30
31 - 40 41 - 50 51 - 60 61 - 70 71 - 80

25.5
35.5 45.5 55.5 65.5 80.5

-20
-10 0 10 20 35

-2
-1 0 1 2 3.5

2
5 11 8 2 1

-4
-5 0 8 4 3.5

8
5 0 8 8 12.25

fy2 = 50.25

Linear Coding - Worked Example 1

Standard Deviation

Now we know the following calculations fy2 = 50.25 f = 30 Mean y = 0.116

Now (sdy)2 = 50.25 - (0.116)2 = > sdy = 1.29


30

And sdx = 10 x sdy = 10 x 1.29

= 12.9 secs.

Linear Coding

Now complete Exercise 1F page 45