Chapter 9 Numerical Integration Numerical Integration Application: Normal Distributions Copyright © The McGraw-Hill Companies, Inc. Permission required.

Slides:



Advertisements
Similar presentations
Chapter 1 Computing Tools Data Representation, Accuracy and Precision Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Advertisements

Chapter 6 Introduction to Continuous Probability Distributions
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 7-1 Chapter 7 Confidence Interval Estimation Statistics for Managers.
Chapter 6 The Normal Distribution and Other Continuous Distributions
Ch. 6 The Normal Distribution
CHAPTER 6 Statistical Analysis of Experimental Data
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 6-1 Chapter 6 The Normal Distribution and Other Continuous Distributions.
Copyright ©2011 Pearson Education, Inc. publishing as Prentice Hall 6-1 Chapter 6 The Normal Distribution & Other Continuous Distributions Statistics for.
Chapter 5 Continuous Random Variables and Probability Distributions
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Lecture Slides Elementary Statistics Eleventh Edition and the Triola Statistics Series by.
Chapter 9 Hypothesis Testing.
Discrete and Continuous Probability Distributions.
Business Statistics: A First Course, 5e © 2009 Prentice-Hall, Inc. Chap 6-1 Chapter 6 The Normal Distribution Business Statistics: A First Course 5 th.
Non-Linear Simultaneous Equations
Chapter 13 Statistics © 2008 Pearson Addison-Wesley. All rights reserved.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Part 6 Calculus.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 9 Hypothesis Testing.
© Copyright McGraw-Hill CHAPTER 6 The Normal Distribution.
Chap 6-1 Copyright ©2013 Pearson Education, Inc. publishing as Prentice Hall Chapter 6 The Normal Distribution Business Statistics: A First Course 6 th.
Review – Using Standard Deviation Here are eight test scores from a previous Stats 201 class: 35, 59, 70, 73, 75, 81, 84, 86. The mean and standard deviation.
Go to Index Analysis of Means Farrokh Alemi, Ph.D. Kashif Haqqi M.D.
HAWKES LEARNING SYSTEMS math courseware specialists Copyright © 2010 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Chapter 8 Continuous.
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 10.2.
The Normal Distribution The “Bell Curve” The “Normal Curve”
Section 7.1 The STANDARD NORMAL CURVE
Probability & the Normal Distribution
Sullivan – Fundamentals of Statistics – 2 nd Edition – Chapter 9 Section 1 – Slide 1 of 39 Chapter 9 Section 1 The Logic in Constructing Confidence Intervals.
Chapter 9 Numerical Integration Flow Charts, Loop Structures Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 6 Finding the Roots of Equations
16-1 Copyright  2010 McGraw-Hill Australia Pty Ltd PowerPoint slides to accompany Croucher, Introductory Mathematics and Statistics, 5e Chapter 16 The.
Lecture 12 Statistical Inference (Estimation) Point and Interval estimation By Aziza Munir.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 1 PROBABILITIES FOR CONTINUOUS RANDOM VARIABLES THE NORMAL DISTRIBUTION CHAPTER 8_B.
Lecture 4 The Normal Distribution. Lecture Goals After completing this chapter, you should be able to:  Find probabilities using a normal distribution.
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc. Chap 5-1 Introduction to Statistics Chapter 6 Continuous Probability Distributions.
1 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Estimating a Population Mean: σ Known 7-3, pg 355.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Lecture Slides Elementary Statistics Eleventh Edition and the Triola Statistics Series by.
Continuous Random Variables Continuous Random Variables Chapter 6.
McGraw-Hill/Irwin Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Continuous Random Variables.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 6 Probability Distributions Section 6.2 Probabilities for Bell-Shaped Distributions.
13-1 Copyright  2010 McGraw-Hill Australia Pty Ltd PowerPoint slides to accompany Croucher, Introductory Mathematics and Statistics, 5e Chapter 13 Measures.
Measures of central tendency are statistics that express the most typical or average scores in a distribution These measures are: The Mode The Median.
1 Chapter 6 Continuous Probability Distributions.
Confidence intervals: The basics BPS chapter 14 © 2006 W.H. Freeman and Company.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Section 7-5 Estimating a Population Variance.
Basic Business Statistics
THE NATURE OF STATISTICS Copyright © Cengage Learning. All rights reserved. 14.
1 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Example: In a recent poll, 70% of 1501 randomly selected adults said they believed.
Chapter 6 The Normal Distribution.  The Normal Distribution  The Standard Normal Distribution  Applications of Normal Distributions  Sampling Distributions.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter The Normal Probability Distribution 7.
Basic Business Statistics, 11e © 2009 Prentice-Hall, Inc. Chap 6-1 The Normal Distribution.
1 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Section 7.4: Estimation of a population mean   is not known  This section.
Statistics for Managers Using Microsoft Excel, 5e © 2008 Pearson Prentice-Hall, Inc.Chap 6-1 Statistics for Managers Using Microsoft® Excel 5th Edition.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.. Chap 6-1 Chapter 6 The Normal Distribution and Other Continuous Distributions Basic Business.
Chap 6-1 Chapter 6 The Normal Distribution Statistics for Managers.
Chapter 6: Descriptive Statistics. Learning Objectives Describe statistical measures used in descriptive statistics Compute measures of central tendency.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
The Normal Distribution. Normal and Skewed Distributions.
Chap 5-1 Discrete and Continuous Probability Distributions.
THE NORMAL DISTRIBUTION
Business Statistics, A First Course (4e) © 2006 Prentice-Hall, Inc. Chap 6-1 Chapter 6 The Normal Distribution Business Statistics, A First Course 4 th.
Chapter 6 Continuous Random Variables Copyright © 2014 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
Normal Distribution and Parameter Estimation
Elementary Statistics
The normal distribution
CONTINUOUS RANDOM VARIABLES AND THE NORMAL DISTRIBUTION
Statistics for Managers Using Microsoft® Excel 5th Edition
Estimating Population Parameters Based on a Sample
The Normal Distribution
Presentation transcript:

Chapter 9 Numerical Integration Numerical Integration Application: Normal Distributions Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Review: Numerical Integration When evaluating a definite integral, remember that we are simply finding the area under the curve between the lower and upper limits This can be done numerically by approximating the area with a series of trapezoids Engineering Computation: An Introduction Using MATLAB and Excel

Review: Trapezoid Area A trapezoidal area is formed: Engineering Computation: An Introduction Using MATLAB and Excel

Other Numerical Integration Methods Higher-order functions allow fewer intervals to be used for similar accuracy For example, Simpson’s Rule uses 2 nd order polynomial approximations to determine the area With the speed of modern computers, using these more efficient algorithms is usually not necessary – the trapezoid method with more intervals is sufficient Engineering Computation: An Introduction Using MATLAB and Excel

Application – Normal Distribution The standard deviation is a commonly-used measure of the variability of a data population or sample A higher standard deviation means that there is greater variability If we assume that the population or standard is distributed as a normal distribution, then we can obtain a lot of useful information about probabilities Engineering Computation: An Introduction Using MATLAB and Excel

Normal Distribution Many numerical populations can be approximated very closely by a normal distribution Examples: – Human heights and weights – Manufacturing tolerances – Measurement errors in scientific experiments The population is characterized by its mean and standard deviation Engineering Computation: An Introduction Using MATLAB and Excel

Normal Distribution The probability density function of the normal distribution can show a graphical view of how the population is distributed The probability density function (pdf) is given by this equation: Engineering Computation: An Introduction Using MATLAB and Excel

Example Consider a population with a mean of 10 and a standard deviation of 1. Here is the pdf: Engineering Computation: An Introduction Using MATLAB and Excel Frequency values approach zero for x- values far away from the mean Peak occurs at mean value of x (10)

Effect of Standard Deviation What if the standard deviation is 1.5 instead of 1? Here is the new pdf, compared with the original: Engineering Computation: An Introduction Using MATLAB and Excel σ = 1.0 σ = 1.5 Note the “wider” shape, as values are more spread out from the mean when the standard deviation is greater

Notes About the Probability Density Function The curve is symmetric about the mean Although the curve theoretically extends to infinity in both directions, the function’s values approach zero and can be ignored for x-values far away from the mean The area under the curve is equal to one – this corresponds to 100% of the population having x- values greater than -  and less than +  The percentage of the population between other limits can be computed by integrating the function between those limits Engineering Computation: An Introduction Using MATLAB and Excel

The Standard Normal Distribution The pdf can be standardized by introducing a new variable Z, the standard normal random variable: The Z-value is simply the number of standard deviations from the mean. Negative values indicate that the data point is below the mean, positive values indicate that the data point is above the mean Engineering Computation: An Introduction Using MATLAB and Excel

Examples For a population with a mean of 30 and a standard deviation of 2, what is the Z-value for: 1.x = 27 Z = -1.5 (1.5 standard deviations below the mean) 2.x = 34 Z = +2.0 (2.0 standard deviations above the mean) 3.x = 30 Z = 0 Engineering Computation: An Introduction Using MATLAB and Excel

Standard Normal Distribution Using the Z-values, we can write the equation for the probability density function as: This form is especially useful in that the same probability density graph applies to all normal distributions (next slide) Engineering Computation: An Introduction Using MATLAB and Excel

Standard Normal Distribution Engineering Computation: An Introduction Using MATLAB and Excel

Integration of Standard Normal Distribution Function As we have stated, the area under the curve from -  to +  is equal to one Often, we want to find the area from -  to a specific value of Z For example, suppose we want to find the percentage of values that are less than one standard deviation above the mean This will be Engineering Computation: An Introduction Using MATLAB and Excel

Integration of Standard Normal Distribution Function This integral is known as the cumulative standard normal distribution This integral does not have a closed-form solution, and must be evaluated numerically There are tables of the results in most statistics books Engineering Computation: An Introduction Using MATLAB and Excel

Typical Table of Integral Values Engineering Computation: An Introduction Using MATLAB and Excel Z-value to one decimal place Second decimal place of Z-value

Integral Value for Z = 1.00 Integral = This means that 84.1% of all values will be less than (mean + 1 standard deviation) Engineering Computation: An Introduction Using MATLAB and Excel

Graphical Interpretation of Answer Engineering Computation: An Introduction Using MATLAB and Excel

In-Class Exercises Consider a sample of concrete test specimens with a mean compressive strength of 4.56 ksi and a standard deviation of ksi Using tables of the cumulative standard normal distribution, find: 1.The percentage of tests with strength values less than 3.50 ksi 2.The percentage of tests with strength values greater than 5.0 ksi 3.The strength value that 99.9% of tests will exceed Engineering Computation: An Introduction Using MATLAB and Excel

1. Percentage of Values Less Than 3.5 ksi Z = (3.5 – 4.56)/0.482 = (round to -2.20) From table: , or 1.4% of values are less than 3.5 ksi. Engineering Computation: An Introduction Using MATLAB and Excel

2. Percentage of Values Greater Than 5 ksi Z = (5.0 – 4.56)/0.482 = (round to 0.91) From table: of the total values are less than 5 ksi, so = , or 18.1% of values are greater than 3.5 ksi. Engineering Computation: An Introduction Using MATLAB and Excel

2. Percentage of Values Greater Than 5 ksi Note that Z = Rather than rounding off, we can get a slightly more accurate answer by linear interpolation of the table values: Cumulative density = Engineering Computation: An Introduction Using MATLAB and Excel

3. Strength Value That 99.9% of Tests Will Exceed We want to find a value that 0.1% (0.001) of tests are below From the table, find the Z-value corresponding to a cumulative density of Z is approximately (note that to 4 decimal places, Z = and Z = have the same value of ) Engineering Computation: An Introduction Using MATLAB and Excel

3. Strength Value That 99.9% of Tests Will Exceed Z = So the value that 99.9% of tests will exceed is 3.10 standard deviations below the mean: Therefore, 99.9% of tests will exceed a value of 3.07 ksi. If we set this value as the lower limit, then an average of one of every 1000 batches of concrete will not meet the specification Engineering Computation: An Introduction Using MATLAB and Excel

Application with MATLAB Calculating the integral directly will eliminate the need to use the tables Since we cannot begin our integration at - , what value of lower limit should we use? How many intervals do we need to use to get acceptable precision for our answers? We will experiment with different values for the lower limit and number of intervals Engineering Computation: An Introduction Using MATLAB and Excel

Function normdist function SUM = normdist(limit, k) lower = -limit; upper = limit; inc = (upper-lower)/k; SUM = 0; x(1) = lower; y(1) = 1/sqrt(2*pi)*exp(-x(1)^2/2); for i = 2:(k+1) x(i) = x(i-1)+inc; y(i) = 1/sqrt(2*pi)*exp(-x(i)^2/2); SUM = SUM +.5*(y(i) + y(i-1))*(x(i) -x(i-1)); end Engineering Computation: An Introduction Using MATLAB and Excel Making “limit” an argument of the function allows us to examine the effect of using different values k = number of increments

Evaluation of Limits, Number of Increments >> format long >> normdist(3,100) ans = >> normdist(3,1000) ans = >> normdist(6,1000) ans = >> normdist(6,10000) ans = >> normdist(6,100) ans = >> normdist(5,100) ans = Engineering Computation: An Introduction Using MATLAB and Excel

Conclusions Limit = 6 (6 standard deviations) gives accuracy to eight decimal places Number of increments less important: similar results for 100, 1000, and increments Use lower limit of -6 standard deviations, 1000 increments Engineering Computation: An Introduction Using MATLAB and Excel

Modified Function normdist function SUM = normdist(Z) % Calculates the % of population with values less than Z lower = -6; upper = Z; k = 1000; inc = (upper-lower)/k; SUM = 0; x(1) = lower; y(1) = 1/sqrt(2*pi)*exp(-x(1)^2/2); for i = 2:(k+1) x(i) = x(i-1)+inc; y(i) = 1/sqrt(2*pi)*exp(-x(i)^2/2); SUM = SUM +.5*(y(i) + y(i-1))*(x(i) -x(i-1)); end Engineering Computation: An Introduction Using MATLAB and Excel

Check >> normdist(0) ans = Should be 0.50 since curve is symmetric >> normdist(1) ans = Checks with value from table Engineering Computation: An Introduction Using MATLAB and Excel