F78SC2 Notes 2 RJRC. If the interest rate is 5%, we substitute x = 0.05 in the formula. This gives

Similar documents
1. Exploratory Data Analysis

Lecture 2 and Lecture 3

CHAPTER 1. Introduction

Chapter 4. Displaying and Summarizing. Quantitative Data

Lecture 2. Quantitative variables. There are three main graphical methods for describing, summarizing, and detecting patterns in quantitative data:

Elementary Statistics

Chapter 2: Tools for Exploring Univariate Data

Describing distributions with numbers

Describing distributions with numbers

are the objects described by a set of data. They may be people, animals or things.

Describing Distributions with Numbers

Histograms allow a visual interpretation

Review for Exam #1. Chapter 1. The Nature of Data. Definitions. Population. Sample. Quantitative data. Qualitative (attribute) data

QUANTITATIVE DATA. UNIVARIATE DATA data for one variable

STAT 200 Chapter 1 Looking at Data - Distributions

Describing Distributions with Numbers

A is one of the categories into which qualitative data can be classified.

Descriptive Statistics

Lecture 1: Descriptive Statistics

CHAPTER 5: EXPLORING DATA DISTRIBUTIONS. Individuals are the objects described by a set of data. These individuals may be people, animals or things.

Chapter 1 - Lecture 3 Measures of Location

1-1. Chapter 1. Sampling and Descriptive Statistics by The McGraw-Hill Companies, Inc. All rights reserved.

Further Mathematics 2018 CORE: Data analysis Chapter 2 Summarising numerical data

STP 420 INTRODUCTION TO APPLIED STATISTICS NOTES

STATISTICS 1 REVISION NOTES

AP Final Review II Exploring Data (20% 30%)

CIVL 7012/8012. Collection and Analysis of Information

Math 140 Introductory Statistics

Math 140 Introductory Statistics

P8130: Biostatistical Methods I

Chapter 1: Exploring Data

Resistant Measure - A statistic that is not affected very much by extreme observations.

2.1 Measures of Location (P.9-11)

What is statistics? Statistics is the science of: Collecting information. Organizing and summarizing the information collected

Units. Exploratory Data Analysis. Variables. Student Data

3.1 Measure of Center

Describing Distributions

Describing Distributions With Numbers

Measures of center. The mean The mean of a distribution is the arithmetic average of the observations:

Measures of Central Tendency

Chapter 3. Measuring data

ADMS2320.com. We Make Stats Easy. Chapter 4. ADMS2320.com Tutorials Past Tests. Tutorial Length 1 Hour 45 Minutes

Descriptive Statistics-I. Dr Mahmoud Alhussami

1.3.1 Measuring Center: The Mean

Statistics for Managers using Microsoft Excel 6 th Edition

Chapter 3. Data Description

Chapter 2: Descriptive Analysis and Presentation of Single- Variable Data

Chapter 2 Descriptive Statistics

Summarising numerical data

Chapter Four. Numerical Descriptive Techniques. Range, Standard Deviation, Variance, Coefficient of Variation

Unit Two Descriptive Biostatistics. Dr Mahmoud Alhussami

Section 3. Measures of Variation

1.3: Describing Quantitative Data with Numbers

Chapter 5. Understanding and Comparing. Distributions

Preliminary Statistics course. Lecture 1: Descriptive Statistics

Quartiles, Deciles, and Percentiles

Objective A: Mean, Median and Mode Three measures of central of tendency: the mean, the median, and the mode.

Exercises from Chapter 3, Section 1

3.1 Measures of Central Tendency: Mode, Median and Mean. Average a single number that is used to describe the entire sample or population

Example 2. Given the data below, complete the chart:

MgtOp 215 Chapter 3 Dr. Ahn

TOPIC: Descriptive Statistics Single Variable

UNIVERSITY OF MASSACHUSETTS Department of Biostatistics and Epidemiology BioEpi 540W - Introduction to Biostatistics Fall 2004

Whitby Community College Your account expires on: 8 Nov, 2015

Determining the Spread of a Distribution

Unit 2. Describing Data: Numerical

1 Measures of the Center of a Distribution

Chapter 1. Looking at Data

Determining the Spread of a Distribution

Fifth Grade Mathematics Mathematics Course Outline

Performance of fourth-grade students on an agility test

Math Literacy. Curriculum (457 topics)

Lecture 1 : Basic Statistical Measures

MATH 117 Statistical Methods for Management I Chapter Three

CHAPTER 2: Describing Distributions with Numbers

Lecture Slides. Elementary Statistics Twelfth Edition. by Mario F. Triola. and the Triola Statistics Series. Section 3.1- #

2011 Pearson Education, Inc

Introduction to Statistics

Lecture Slides. Elementary Statistics Tenth Edition. by Mario F. Triola. and the Triola Statistics Series. Slide 1

Lecture 6: Chapter 4, Section 2 Quantitative Variables (Displays, Begin Summaries)

Section 3.2 Measures of Central Tendency

Lecture 11. Data Description Estimation

Notation Measures of Location Measures of Dispersion Standardization Proportions for Categorical Variables Measures of Association Outliers

Week 1: Intro to R and EDA

What is Statistics? Statistics is the science of understanding data and of making decisions in the face of variability and uncertainty.

Chapter2 Description of samples and populations. 2.1 Introduction.

Types of Information. Topic 2 - Descriptive Statistics. Examples. Sample and Sample Size. Background Reading. Variables classified as STAT 511

KCP e-learning. test user - ability basic maths revision. During your training, we will need to cover some ground using statistics.

Describing Distributions With Numbers Chapter 12

Announcements. Lecture 1 - Data and Data Summaries. Data. Numerical Data. all variables. continuous discrete. Homework 1 - Out 1/15, due 1/22

The empirical ( ) rule

Stat 101 Exam 1 Important Formulas and Concepts 1

Lecture 1: Description of Data. Readings: Sections 1.2,

ST Presenting & Summarising Data Descriptive Statistics. Frequency Distribution, Histogram & Bar Chart

Chapter 2 Solutions Page 15 of 28

Shape, Outliers, Center, Spread Frequency and Relative Histograms Related to other types of graphical displays

ECLT 5810 Data Preprocessing. Prof. Wai Lam

Lecture 2. Descriptive Statistics: Measures of Center

PhysicsAndMathsTutor.com

Review for Algebra Final Exam 2015

Transcription:

F78SC2 Notes 2 RJRC Algebra It is useful to use letters to represent numbers. We can use the rules of arithmetic to manipulate the formula and just substitute in the numbers at the end. Example: 100 invested for 2 years. If we use x to represent the interest rate. After one year, the value will be 100(1 + x) After 2 years, the value will be 100(1 + x) 2 If the interest rate is 5%, we substitute x = 0.05 in the formula. This gives 110.25 Example: 100 invested. What interest rate would give a value of 115 after 2 years? Require 100(1 + x) 2 = 115 So (1 + x) 2 = 1.15 So 1 + x = 1.0724 So x = 7.24% Revision: Rules of Arithmetic Order of calculations: 1. Evaluate expressions within brackets. 2. Evaluate functions (e.g. square root, power, log, exp). 3. Evaluate multiplications and divisions. 4. Evaluate additions and subtractions. Note that multiplying two negative numbers gives a positive answer. Examples (using positive value of square root): 1. 1 + 3 9 = 10 2. (1 + 3) 9 = 12 3. 1 2 + 3 2 = 10 4. 1 2 3 2 = 10 5. ( 1) 2 + ( 3) 2 = 10 6. (1 + 3) 2 = 16 Minus Signs Note: 1 2 = 1 is not the same as ( 1) 2 = +1 What is meant by expressions such as: 1 2? Answer: Take the negative number 1 and then subtract 2 from it. Note that the minus sign is used in two different ways: 1

As a unary operator to change 1 to 1 As a binary operator to subtract 2 from 1 The above shows how to interpret expressions like 1 2. The second minus sign is a unary minus, so 2 is subtracted from 1, giving the answer 3. 2

Histograms Suitable for continuous data. Data values are grouped into Bins and the numbers in each bin are counted. Bins need not be all of the same width. Examples: Student heights, House prices. Construction: 1. Choose bin width so that there are between 6 and 20 bins. Use more bins for larger sample sizes. First bin should contain the minimum value and last should contain the maximum. 2. Construct the frequency table. 3. Draw histogram. The Area of each rectangle should be proportional to the number in the bin. Note: Minitab does not allow unequal bin widths. Drawing Histograms Rule for unequal bin widths: Area Frequency Height Width Frequency Height Frequency Width Example: The Edinburgh house price data is a case where different bin widths should be used. Band Width Freq. F W 200F W 50-99 50 1 0.02 4 100-149 50 8 0.16 32 150-199 50 13 0.26 52 200-249 50 12 0.24 48 250-299 50 5 0.10 20 300-399 100 8 0.08 16 400-599 200 1 0.005 1 600-999 400 2 0.005 1 The height of each rectangle must be proportional to the value in the penultimate column of the table it may be more convenient when plotting by hand to multiply these values by a suitable constant, such as 200. 3

Figure 1: Histrogram of Student heights, equal bin sizes Figure 2: Histrogram of House Prices, equal bin sizes 4

Histogram of Price Density 0.000 0.001 0.002 0.003 0.004 0.005 0 200 400 600 800 1000 Price Figure 3: Histrogram of House Prices, unequal bin sizes Stem-and-Leaf Plots Similar to histogram, but contains much more information. Bin widths are taken as a power of 10 times either 2 or 5 or 10. Suitable for continuous or discrete data. Example: Heights (in cm.) of a random sample of 60 students: 173 173 170 178 191 183 183 178 185 165 183 178 180 168 173 155 175 175 191 175 173 175 185 175 185 160 183 178 170 173 178 185 168 168 173 183 185 178 168 175 170 165 173 168 175 175 175 170 180 163 180 170 175 178 178 180 165 173 178 175 Find minimum and maximum (155, 191). Decide on bin size 2 s will give 19 bins and 5 s will give 8, so use latter. Write Stem 15, 16, 16, 17, 17, 18, 18, 19. 5

Go through data set writing next digit ( Leaf ) against the appropriate stem value. Where a stem value is repeated, leaves 0 to 4 go against the first and 5 to 9 against the second. Rewrite table with leaf values in ascending order. Optional extra: add cumulative frequencies to the plot. Note that the numbers in a stem-and-leaf plot may be truncated. statistics obtained by using them are sometimes rather too small. Thus any summary Minitab output. Stem-and-leaf of heights N = 60 Leaf Unit = 1.0 1 15 5 3 16 03 11 16 55588888 24 17 0000033333333 (20) 17 55555555555888888888 16 18 000033333 7 18 55555 2 19 11 Notes: The first column above gives cumulative frequencies; these are calculated from below and from above. The (20) indicates that there are 20 students in the category where these meet. The reason that there are only a limited number of different leaf values is because the original values were recorded in inches and then converted to centimetres. The following is a plot of the same data in inches here each bin on the stem has two leaf values associated with it. Stem-and-leaf of C2 N = 60 Leaf Unit = 1.0 1 6 1 2 6 3 6 6 4555 16 6 6666677777 (19) 6 8888888899999999999 25 7 0000000001111 12 7 2222233333 2 7 55 6

Note that changes in the starting value and to the bin width mean that the outline has a slightly different shape from the previous plot. Graphical methods are often a useful first step in looking at sample data and are also useful for presenting conclusions to others. If we wish to draw conclusions about the data, we usually need to use numerical methods. Averages (Rees 4.1-4.5) There are many summary statistics that can be calculated for quantitative variables. Those that give the location are the most important. There are several ways of describing where the centre of the data is: the sample mean and the median are the commonest. Sample Mean The following symbols will be used to describe the calculations: Sample size: n (number of values in sample) Data values: Sample mean: x 1, x 2,..., x n x x = sum of data values sample size = x 1 + x 2 + + x n n = 1 n x i n i=1 The suffix notation is used to make it clear which values are being added. This can often be omitted: x x = n Examples: Data: 1, 2, 3 Total = 6 Mean = 2.0 Data: 4, 6 Total = 10 Mean = 5.0 Data: 1, 2, 3, 4, 6 Total = 16 Mean = 3.2 Note that the overall mean is not the average of the two separate means. Example: Failure times. Fourteen electrical components were tested to destruction. Failure times in hours were: 7

55 283 76 197 5 45 102 28 37 4 139 10 82 75 n = 14 xi = 55 + 283 + + 75 = 1138 x = 1138 14 = 81.3 Mean failure time = 81.3 hours To calculate an overall mean from group means, it is important to allow for any differences in sample sizes. One way to do this is by calculating the individual totals. These are then added to get the overall total and hence the overall mean. Example: Mean age of 50 males = 22.6 years Mean age of 30 females = 19.4 years Mean age of combined group of 80 people? Male total = 22.6 50 = 1130 Female total = 19.4 30 = 582 Mean age = 1130 + 582 = 21.4 years 50 + 30 Example: Mean salary of 50 people = 18500 Mean salary of 30 males = 18100 Overall total = 18500 50 = 925000 Male total = 18100 30 = 543000 Female total = 925000 543000 = 382000 Female mean = 382000 = 19100 20 Sometimes data is available as a frequency table. Example: Articles produced in a manufacturing process were examined by taking regular samples of 20 articles. The number of defective articles in each sample was noted. The following data were obtained: Number of defectives 0 1 2 3 4 5 6 Frequency 11 10 9 7 1 0 2 8

Note that the 11 in the frequency table means that the value 0 occurred 11 times. So: n = 11 + 10 + 9 + 7 + 1 + 2 = 40 xi = 0 + 0 + + 0 + 1 + 1 + + 1 + 2 + + 2 + 3 + + 3 + 4 + 6 + 6 = 11 0 + 10 1 + 9 2 + 7 3 + 4 1 + 6 2 = 10 + 18 + 21 + 4 + 12 = 65 x = 65 40 = 1.625 The general rule for frequency data is: x = fi x i fi where f i is the frequency of outcome x i Averages Median The median is the middle value when the data have been sorted. The median is used when the data set contains extreme values which would distort the mean. For example, in data set B (failures), x = 81.3. This value is rather larger than what might be considered a typical value from this data set. The data must be sorted before the median can be calculated. If we have n data points then: if n is odd, it is the ( ) n+1 2 sorted value. if n is even, it is the average of the ( ) ( n 2 and the n + 2 1) sorted values. Example: Failure times Sorted data: 4, 5, 10, 28, 37, 45, 55, 75, 76, 82, 102, 139, 197, 283 n = 14 so require the average of the 7th and 8th sorted values. So median = 55+75 2 = 65 hours. The Median, Robustness and Skewness The mean is the best measure of location if the shape of the plotted data is roughly symmetric. The median is a more robust measure of what is typical than the mean. i.e. the 9

median is not really affected by a few extreme values. Example: Consider the two artificial data sets {1, 2, 3, 4, 5} and {1, 2, 3, 4, 90}. Both sets have a median of 3, but the mean of the first is 3 and the mean of the second is 20. Example: Failure data. The extreme value of 283 distorted the mean. This is an example of data that are skew. A plot shows that the data are not symmetric, but have a tail on the right. Other measures of location are sometimes used. Minitab uses the trimmed mean the largest and smallest 5% of values are removed and the mean of the remaining 90% is calculated. For frequency tables, the mode is sometimes used; this is the most frequent category (or group). 10

Measures of Spread (Rees 4.6-4.10) It is important to compute a measure of spread as well as an average. In other words, a measure of whether the data values are spread out or are bunched together. The simplest measure is: Range = Maximum Minimum This is not very satisfactory because it tends to increase as the sample size increases. Another possible measure of spread is to take the (positive) distance d i of each point x i from the mean, i.e. d i = x i x. The mean of these distances could be used, but this turns out to be awkward to work with, so a different measure is used. Standard deviation (Rees 4.8) 1. Find the squared distance between x i and x d 2 i = (x i x) 2 2. Add these up and divide the total by n 1 (instead of n) to find a mean. 3. Undo the squaring s = (xi x) 2 n 1 Notes: 1. Alternative formula (easier to compute). s = 1 n 1 ( x 2 i ( ) x i ) 2 n 2. The divisor n 1 is used because estimating x uses up one of the pieces of information that we have. On the very rare occasions that the population mean is known exactly, the divisor n is used. This is called the population standard deviation to distinguish it from the sample standard deviation, which is the usual form. 3. Many calculators provide a quick way to find a sample mean and standard deviation. There will often be a button labelled σ n 1 4. The standard deviation is in the same units as the data. E.g. if x i is measured in cm, then s is measured in cm. 5. The larger the value of s, the more the data is spread out about the mean. It is analogous to the moment of inertia in physics. 6. The square of the standard deviation is called the Variance. 11

Example: 3 data values 2, 3, 7 n = 3 x = 2+3+7 = 4 3 (x i x) = 2, 1, 3 n (x i x) 2 = 4 + 1 + 9 = 14 i=1 Sample variance = 14 = 7 (3 1) Alternatively n x i = 2 + 3 + 7 = 12 i=1 n x 2 i = 4 + 9 + 49 = 62 i=1 ( Variance = 1 (3 1) 62 12 2 3 ) = 1 (62 48) = 7 2 So sample Standard Deviation = 7 = 2.646 The Greek letter σ (sigma) is often used to denote standard deviation. Calculators often have keys labelled σ n and σ n 1 The latter is the one to use for the sample S.D. Example: Failure times n = 14 xi = 1138 x 2 i = 55 2 + 283 2 + + 75 2 = 174092 s = 1 13 ( 6276.07 = 13 = 79.2 hours 174092 11382 14 ) More Standard Deviation Examples: In each case, the mean is 5.0 Sample data: 5, 5, 5 Standard Deviation = 0.0 Sample data: 4, 5, 6 Standard Deviation = 1.0 Sample data: 1, 5, 9 Standard Deviation = 4.0 Sample data: 1, 1, 5, 5, 9, 9 Standard Deviation = 3.58 12

Sample data: 1, 2, 3, 4, 5, 6, 7, 8, 9 Standard Deviation = 2.74 An earlier example showed that when groups are combined, the overall mean is obtained by adding totals rather than averaging means. To obtain an overall standard deviation, it is necessary to add up the sums of squared values. Example: Data: 1, 2, 3 Total SS = 14 S.D. = 1.00 Data: 4, 6 Total SS = 52 S.D. = 1.41 Data: 1, 2, 3, 4, 6 Total SS = 66 S.D. = 1.92 The overall s.d. = (66 16 2 /5)/4 = 1.92 Note that the abbreviations SS and S.D. are often used for the Sums of Squares and for Standard Deviation respectively. It is possible to calculate the total and total sums of squares from the group sample size, mean and standard deviation. This is done by reversing the calculations above. For example: x = nx Beware of rounding errors if you do this. Standard deviation from a frequency table It is possible to enter all the data directly, but it is usually best to use the table by adding extra columns. Example: Number of defectives Number Freq. x f fx fx 2 0 11 0 0 1 10 10 10 2 9 18 36 3 7 21 63 4 1 4 16 5 0 0 0 6 2 12 72 Totals 40 65 197 Thus: n = 40 x = 65 x 2 = 197 13

So: x = 65 40 = 1.625 s.d. = 1 (40 1) Accuracy ( 197 652 40 ) = 1.53 It is rarely useful to report the value of a standard deviation to more than 3 significant figures. So: Report 1.23456 as 1.23 or possibly 1.235 and 98.7654 as 98.8 A mean should usually be reported to the same number of decimal places as the corresponding standard deviation, or to one less decimal place. So for the two standard deviations above: A mean of 5.4321 might be given as 5.43 and a mean of 543.21 might be given as 543. Notes 1. It is important to not round off numbers too early, especially when finding standard deviations. 2. If reported values are used in other calculations, the accurate values should be used, rather than the rounded values. Rounding If a number is exactly 2.345, there is no universally agreed way to round to 2 d.p. A good rule is to round to the nearest even number. So: 2.345 2.34 2.355 2.36 Inter-quartile range (Rees 4.9) If the data is skew, the inter-quartile range may be a better measure of spread than the standard deviation. The lower quartile Q1 is value such that a quarter of the sample takes values less than Q1. How do we calculate it? If we have n data points arranged in ascending order then Q1 is the ( ) n+1 4 st observation. The upper quartile Q3 is value such that a quarter of sample takes values greater than Q3. How do we calculate it? If we have n data points arranged in ascending order then Q3 is the ( ) ( ) 3(n+1) 4 st observation. Equivalently, it is the n+1 4 st observation when counting down 14

from the largest value. The inter-quartile range (IQR) is defined to be IQR = Q3 Q1. Note: This is the method of calculation used by Minitab. Some books use slightly different ways of estimating the quartiles. You may also encounter Deciles and Percentiles; these divide data into tenths and hundredths. Example: Failure times n=14 So Q1 is the n+1 4 = 14+1 4 = 3.75th observation. Q3 is the 3(n+1) 4 = 3(14+1) 4 = 11.25th observation. Data: 4, 5, 10, 28, 37, 45, 55, 75, 76, 82, 102, 139, 197, 283 3rd observation = 10 and 4th observation = 28 So: Q1 = 10 + (0.75)(28 10) = 10 + 13.5 = 23.5 hours 11th observation = 102 & 12th observation = 139 So: Q3 = 102 + (0.25)(139 102) = 102 + 9.25 = 111.25 hours The inter-quartile range IQR = 111.25 23.5 = 87.75 hours. Note: A stem-and-leaf plot presents data in a sorted form, so can be used to find the median and quartiles. However, the resulting values may be rather too small, because the plot sometimes truncates numbers. Box Plot The quartiles can be used to create a display of the data called a box-and-whisker plot or box plot. The box is formed from the quartiles and the whiskers connect the box to the maximum and the minimum. 15

Min LQ Median UQ Max If the data are skew, the median will not be near the middle of the box, and one whisker will be much longer than the other. The values used in drawing a boxplot are called a five number summary. Example: Failure times The five number summary is {4, 23.5, 65, 111.25, 283} 16

Properties of Mean and Standerd Deviation If data are roughly symmetrical about mean, then: Approximately 2 will be within 1 s.d. of the mean 3 Approximately 95% will be within 2 s.d. of mean Usually all will be within 3 s.d. of the mean. The Inter-Quartile Range will be approximately 1.35 standard deviations. Standard Scores An individual data point could be considered to be extreme if it is several standard deviations away from the mean. The standard score (z-score, standardised value) for x is: z = x x s This measures how many standard deviations x is above or below the mean. Example: Failure times Recall that x = 81.3 and s = 79.2 55 283 55 81.3 79.2 283 81.3 79.2 This suggests that 283 might be unusual. = 0.33 small z (typical) = 2.55 large z (extreme) Change of Scale If a constant is added to all of the data values, the Mean is increased by the same constant; the S.D. is unchanged. If all the data values are multiplied by a constant, the Mean and S.D. are both multiplied by the same constant. Example: Temperature conversion from C to F. Need to multiply by 1.8 and add 32. Celsius Mean = 15 C and S.D. = 5.5 C Fahrenheit Mean = 15 1.8 + 32 = 59 F Fahrenheit S.D. = 5.5 1.8 = 9.9 F 17