ENGR-25_Lec-19_Statistics-1.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed.

Slides:



Advertisements
Similar presentations
MTH16_Lec-21_sec_11-2_Continuous_PDFs.pptx 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical &
Advertisements

Probability Distributions CSLU 2850.Lo1 Spring 2008 Cameron McInally Fordham University May contain work from the Creative Commons.
SUMMARIZING DATA: Measures of variation Measure of Dispersion (variation) is the measure of extent of deviation of individual value from the central value.
Normal Distribution; Sampling Distribution; Inference Using the Normal Distribution ● Continuous and discrete distributions; Density curves ● The important.
MTH16_Lec-19_sec_10-3_Taylor_Series.pptx 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical & Mechanical.
Sampling Distributions (§ )
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
Sections 4.1 and 4.2 Overview Random Variables. PROBABILITY DISTRIBUTIONS This chapter will deal with the construction of probability distributions by.
1. Are Women Paid Less than Men? Intro and revision of basic statistics.
McGraw-Hill Ryerson Copyright © 2011 McGraw-Hill Ryerson Limited. Adapted by Peter Au, George Brown College.
Quality Control Procedures put into place to monitor the performance of a laboratory test with regard to accuracy and precision.
1 Sociology 601, Class 4: September 10, 2009 Chapter 4: Distributions Probability distributions (4.1) The normal probability distribution (4.2) Sampling.
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.
Introduction to MATLAB for Engineers, Third Edition William J. Palm III Chapter 7 Statistics, Probability, and Interpolation PowerPoint to accompany Copyright.
QMS 6351 Statistics and Research Methods Probability and Probability distributions Chapter 4, page 161 Chapter 5 (5.1) Chapter 6 (6.2) Prof. Vera Adamchik.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 6-1 Chapter 6 The Normal Distribution and Other Continuous Distributions.
 The Law of Large Numbers – Read the preface to Chapter 7 on page 388 and be prepared to summarize the Law of Large Numbers.
Random variables; discrete and continuous probability distributions June 23, 2004.
Probability (cont.). Assigning Probabilities A probability is a value between 0 and 1 and is written either as a fraction or as a proportion. For the.
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.
R. Kass/S07 P416 Lec 3 1 Lecture 3 The Gaussian Probability Distribution Function Plot of Gaussian pdf x p(x)p(x) Introduction l The Gaussian probability.
Random Variables A random variable A variable (usually x ) that has a single numerical value (determined by chance) for each outcome of an experiment A.
 A number expressing the likelihood that a specific event will occur, expressed as the ratio of the number of actual occurrences.
© Copyright McGraw-Hill CHAPTER 6 The Normal Distribution.
Chapter 7: The Normal Probability Distribution
8.5 Normal Distributions We have seen that the histogram for a binomial distribution with n = 20 trials and p = 0.50 was shaped like a bell if we join.
1 DATA DESCRIPTION. 2 Units l Unit: entity we are studying, subject if human being l Each unit/subject has certain parameters, e.g., a student (subject)
Random Variables & Probability Distributions Outcomes of experiments are, in part, random E.g. Let X 7 be the gender of the 7 th randomly selected student.
Continuous Probability Distributions  Continuous Random Variable  A random variable whose space (set of possible values) is an entire interval of numbers.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Review and Preview This chapter combines the methods of descriptive statistics presented in.
1 Normal Random Variables In the class of continuous random variables, we are primarily interested in NORMAL random variables. In the class of continuous.
Probability The definition – probability of an Event Applies only to the special case when 1.The sample space has a finite no.of outcomes, and 2.Each.
Theory of Probability Statistics for Business and Economics.
Sullivan – Fundamentals of Statistics – 2 nd Edition – Chapter 11 Section 1 – Slide 1 of 34 Chapter 11 Section 1 Random Variables.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 6-1 Chapter 6 The Normal Distribution and Other Continuous Distributions.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Learning Objectives for Section 11.5 Normal Distributions The student will be able to identify what is meant.
Chapter 11 Data Descriptions and Probability Distributions Section 5 Normal Distribution.
Chapter 6: Continuous Distributions. LO1Solve for probabilities in a continuous uniform distribution. LO2Solve for probabilities in a normal distribution.
Random Variables Numerical Quantities whose values are determine by the outcome of a random experiment.
5.3 Random Variables  Random Variable  Discrete Random Variables  Continuous Random Variables  Normal Distributions as Probability Distributions 1.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
The two way frequency table The  2 statistic Techniques for examining dependence amongst two categorical variables.
Two Main Uses of Statistics: 1)Descriptive : To describe or summarize a collection of data points The data set in hand = the population of interest 2)Inferential.
1 2 nd Pre-Lab Quiz 3 rd Pre-Lab Quiz 4 th Pre-Lab Quiz.
Probability and Statistics in Geology Probability and statistics are an important aspect of Earth Science. Understanding the details, population of a data.
PROBABILITY AND STATISTICS FOR ENGINEERING Hossein Sameti Department of Computer Engineering Sharif University of Technology Mean, Variance, Moments and.
CY1B2 Statistics1 (ii) Poisson distribution The Poisson distribution resembles the binomial distribution if the probability of an accident is very small.
Basic Business Statistics
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 6: Random Variables Section 6.1 Discrete and Continuous Random Variables.
Probability Theory Modelling random phenomena. Permutations the number of ways that you can order n objects is: n! = n(n-1)(n-2)(n-3)…(3)(2)(1) Definition:
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
Discrete Probability Distributions. Random Variable A random variable X takes on a defined set of values with different probabilities. For example, if.
CHAPTER – 1 UNCERTAINTIES IN MEASUREMENTS. 1.3 PARENT AND SAMPLE DISTRIBUTIONS  If we make a measurement x i in of a quantity x, we expect our observation.
Warsaw Summer School 2015, OSU Study Abroad Program Normal Distribution.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.. Chap 6-1 Chapter 6 The Normal Distribution and Other Continuous Distributions Basic Business.
Lecture 8: Measurement Errors 1. Objectives List some sources of measurement errors. Classify measurement errors into systematic and random errors. Study.
Computing Fundamentals 2 Lecture 7 Statistics, Random Variables, Expected Value. Lecturer: Patrick Browne
R. Kass/W04 P416 Lec 3 1 Lecture 3 The Gaussian Probability Distribution Function Plot of Gaussian pdf x p(x)p(x) Introduction l The Gaussian probability.
Sampling Distributions
MECH 373 Instrumentation and Measurements
The Gaussian Probability Distribution Function
Sampling Distributions
Section Means and Variances of Random Variables
CHAPTER – 1.2 UNCERTAINTIES IN MEASUREMENTS.
CHAPTER – 1.2 UNCERTAINTIES IN MEASUREMENTS.
Presentation transcript:

ENGR-25_Lec-19_Statistics-1.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical & Mechanical Engineer Engr/Math/Physics 25 Chp7 Statistics-1

ENGR-25_Lec-19_Statistics-1.ppt 2 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Learning Goals  Use MATLAB to solve Problems in Statistics Probability  Use Monte Carlo (random) Methods to Simulate Random processes  Properly Apply Interpolation or Extrapolation to Estimate values between or outside of know data points

ENGR-25_Lec-19_Statistics-1.ppt 3 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Histogram  Histograms are COLUMN Plots that show the Distribution of Data Height Represents Data Frequency  Some General Characteristics Used to represent continuous grouped, or BINNED, data –BIN  SubRange within the Data Usually Does not have any gaps between bars Areas represent %-of-Total Data

ENGR-25_Lec-19_Statistics-1.ppt 4 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods HistoGram ≡ Frequency Chart  A HistoGram shows how OFTEN some event Occurs Histograms are often constructed using Frequency Tables

ENGR-25_Lec-19_Statistics-1.ppt 5 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Histograms In MATLAB  MATLAB has 6 Forms of the Histogram Cmd  The Simplest Hist(y)  The Plot Statement Generates a Histogram with 10 bins  Example: Max Temp at Oakland AirPort in Jul-Aug08 TmaxOAK = [70, 75, 63, 64, 65, 66, 65, 65, 67, 78, 75, 73, 79, 71, 72, 67, 69, 69, 70, 74, 71, 72, 71, 74, 77, 77, 86, 90, 90, 70, 71, 66, 66, 72, 68, 73, 72, 82, 91, 82, 76, 75, 72, 72, 69, 70, 68, 65, 67, 65, 63, 64, 72, 70, 68, 71, 77, 65, 63, 69, 69, 67] hist(TmaxOAK), ylabel('No. Days'), xlabel('Max. Temp (°F)'), title('Oakland Airport - Jul-Aug08')

ENGR-25_Lec-19_Statistics-1.ppt 6 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods hist Result for Oakland  It was COLD in Summer 08  Bin Width = (91-63)/10 = 2.8 °F

ENGR-25_Lec-19_Statistics-1.ppt 7 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Histograms In MATLAB  Next Example: Max Temp at Stockton AirPort in Jul-Aug08 Hist(y)  The Plot Statement Generates a Histogram with 10 bins TmaxSTK = [94, 98, 93, 94, 91, 96, 93, 87, 89, 94, 100, 99, 103, 103, 103, 97, 91, 83, 84, 90, 89, 95, 94, 99, 97, 94, 102, 103, 107, 98, 86, 89, 95, 91, 84, 93, 98, 104, 105, 107, 103, 91, 90, 96, 93, 86, 92, 93, 95, 95, 86, 81, 93, 97, 96, 97, 101, 92, 89, 92, 93, 94] hist(TmaxSTK), ylabel('No. Days'), xlabel('Max. Temp (°F)'), title(‘Stockton Airport - Jul-Aug08')

ENGR-25_Lec-19_Statistics-1.ppt 8 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods hist Result for Stockton  It was HOT in Summer 08  Bin Width = (107-81)/10 = 2.6 °F

ENGR-25_Lec-19_Statistics-1.ppt 9 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods hist Command Refinements  Adjust The number and width of the bins using hist(y,N) hist(y,x) Where –N  an integer specifying the NUMBER of Bins –x  A vector that Specs CENTERs of the Bins  Consider Summer 08 Max-Temp Data from Oakland and Stockton  Make 2 Histograms 17 bins 60F→110F by 2.5’s

ENGR-25_Lec-19_Statistics-1.ppt 10 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods hist Plots  17 Bins >> hist(TmaxSTK,17), ylabel('No. Days'), xlabel('Max. Temp (°F)'), title('Stockton, CA - Jul- Aug08')>> hist(TmaxOAK,17), ylabel('No. Days'), xlabel('Max. Temp (°F)'), title('Oakland, CA - Jul- Aug08')

ENGR-25_Lec-19_Statistics-1.ppt 11 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods hist Plots  Same Scale >> x = [60:2.5:110]; >> hist(TmaxSTK,x), ylabel('No. Days'), xlabel('Max. Temp (°F)'), title('Stockton, CA - Jul- Aug08') >> x = [60:2.5:110]; hist(TmaxOAK,x), ylabel('No. Days'), xlabel('Max. Temp (°F)'), title('Oakland, CA - Jul- Aug08')

ENGR-25_Lec-19_Statistics-1.ppt 12 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods hist Numerical Output  Hist can also provide numerical Data about the Histogram n = hist(y) Gives the number of values in each of the (default) 10 Bins  For the Stockton data k =  We can also spec the number and/or Width of Bins >> k13 = hist(TmaxSTK,13) k13 = >> k2_5s = hist(TmaxOAK,x)

ENGR-25_Lec-19_Statistics-1.ppt 13 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods hist Numerical Output  Bin-Count and Bin-Locations (Frequency Table) for the Oakland Data >> [u, v] = hist(TmaxOAK,x) u = v =

ENGR-25_Lec-19_Statistics-1.ppt 14 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Histogram Commands - 1 CommandDescription bar(x,y) Creates a bar chart of y versus x. hist(y) Aggregates the data in the vector y into 10 bins evenly spaced between the minimum and maximum values in y. hist(y,n) Aggregates the data in the vector y into n bins evenly spaced between the minimum and maximum values in y. hist(y,x) Aggregates the data in the vector y into bins whose center locations are specified by the vector x. The bin widths are the distances between the centers.

ENGR-25_Lec-19_Statistics-1.ppt 15 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Histogram Commands - 2 CommandDescription [z,x] = hist(y) Same as hist(y) but returns two vectors z and x that contain the frequency count and the 10 bin locations. [z,x] = hist(y,n) Same as hist(y,n) but returns two vectors z and x that contain the frequency cnt and the n bin locations. [z,x] = hist(y,x) Same as hist(y,x) but returns two vectors z and x that contain the frequency count and the bin locations. The returned vector x is the same as the user-supplied vector x.

ENGR-25_Lec-19_Statistics-1.ppt 16 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Data Statistics Tool - 1  Make Line- Plot of Temp Data for Stockton, CA  Use the Tools Menu to find the Data Statistics Tool

ENGR-25_Lec-19_Statistics-1.ppt 17 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Data Statistics Tool - 2  Use the Tool to Add Plot Lines for The Mean ±StdDev

ENGR-25_Lec-19_Statistics-1.ppt 18 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Data Statistics Tool - 3  Quite a Nice Tool, Actually  The Result  The Avg Max Temp Was °F

ENGR-25_Lec-19_Statistics-1.ppt 19 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Probability  Probability  The LIKELYHOOD that a Specified OutCome Will be Realized The “Odds” Run from 0% to 100% What are the Odds of winning the California MEGA-MILLIONS Lottery?  Class Question: What are the Odds of winning the California MEGA-MILLIONS Lottery?

ENGR-25_Lec-19_Statistics-1.ppt 20 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods EXACTLY???!!!  To Win the MegaMillions Lottery Pick five numbers from 1 to 56 Pick a MEGA number from 1 to 46  The Odds for the 1 st ping-pong Ball = 5 out of 56  The Odds for the 2 nd ping-pong Ball = 4 out of 55, and so On  The Odds for the MEGA are 1 out of 46

ENGR-25_Lec-19_Statistics-1.ppt 21 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Calculated  Calc the OverAll Odds as the PRODUCT of each of the Individual OutComes This is Technically a COMBINATION

ENGR-25_Lec-19_Statistics-1.ppt 22 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods is a DEAL!  The ORDER in Which the Ping-Pong Balls are Drawn Does NOT affect the Winning Odds  If we Had to Match the Pull-Order: This is a PERMUTATION

ENGR-25_Lec-19_Statistics-1.ppt 23 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Normal Distribution - 1  Consider Data on the Height of a sample group of 20 year old Men  We can Plot this Frequency Data using bar >> y_abs=[1,0,0,0,2,4,5, 4,8,11,12,10,9,8,7,5, 4,4,3,1,1,0,1]; >> xbins = [64:0.5:75]; >> bar(xbins, y_abs), ylabel('No.'), xlabel('Height (Inches'), title('Height of 20 Yr-Old Men')

ENGR-25_Lec-19_Statistics-1.ppt 24 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Normal Distribution - 2  We can also SCALE the Bar/Hist such that the AREA UNDER the CURVE equals 1.00, exactly  The Game Plan for Scaling Calc the Height of Each Bar To Get the Total Area = [Bin Width] x [Σ(individual counts)] The individual Bar Area = [Bin Width] x [individual count] %-Area any one bar → [Bar Areas]/[Total Area]

ENGR-25_Lec-19_Statistics-1.ppt 25 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Normal Distribution - 3  We can Use bar to Plot the Scaled-Area Hist. >>y_abs=[1,0,0,0,2,4,5,4,8,11,12,10,9,8,7,5,4,4,3,1,1,0,1] ; >> xbins = [64:0.5:75]; >> TotalArea = sum(0.5*y_abs) >> y_scale = 100*y_abs/TotalArea; >> bar(xbins, y_scale), ylabel('Fraction (%/inch)'), xlabel('Height (inches)'), title('Height of 20 Yr-Old Men')

ENGR-25_Lec-19_Statistics-1.ppt 26 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Normal Distribution - 4  This is a Good Time for a UNITS Check Remember, our GOAL → the Area Under the Curve = 1  Recall From the Plot the UNITS for the y-axis → %/inch (?)  The Units come from these MATLAB Statements  So TotalArea is in inchesNo.  Now y_scale TotalArea = sum(0.5*y_abs) Bin Width in INCHES y_scale = 100*y_abs/TotalArea; Cont. on Next Slide

ENGR-25_Lec-19_Statistics-1.ppt 27 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Normal Distribution - 5  The Units Analysis for y-scale  Recall From MTH1 that for y = f(x) displayed in BAR Form the Area Under the Curve y_scale = 100*y_abs/TotalArea;

ENGR-25_Lec-19_Statistics-1.ppt 28 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Normal Distribution - 6  In this Case y(x) → y_scale in %/inch Δx → Bin Width = 0.5 in inches  Then The Units Analysis for Our “integration”  Check the integration Example

ENGR-25_Lec-19_Statistics-1.ppt 29 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Normal Distribution - 7  Example  71”  The 71” Bar Area = HgtWidth:  Alternatively from the Absolute values The Total Abs Area = 50 No.inch 

ENGR-25_Lec-19_Statistics-1.ppt 30 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Probability Distribution Fcn (PDF)  Because the Area Under the Scaled Plot is 1.00, exactly, The FRACTIONAL Area under any bar, or set-of-bars gives the probability that any randomly Selected 20 yr-old man will be that height  e.g., from the Plot we Find 67.5 in → 8 %/in 68 in → 16 %/in 68.5 in → 22%/in  Summing → 46 %/in  Multiply the Uniform BinWidth of 0.5 in → 23% of 20 yr-old men are inches tall

ENGR-25_Lec-19_Statistics-1.ppt 31 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Random Variable  A random variable x takes on a defined set of values with different probabilities; e.g.. If you roll a die, the outcome is random (not fixed) and there are 6 possible outcomes, each of which occur with equal probability of one-sixth. If you poll people about their voting preferences, the percentage of the sample that responds “Yes on Proposition 101” is a also a random variable –the %-age will be slightly differently every time you poll.  Roughly, probability is how frequently we expect different outcomes to occur if we repeat the experiment over and over (“frequentist” view)

ENGR-25_Lec-19_Statistics-1.ppt 32 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Random variables can be Discrete or Continuous  Discrete random variables have a countable number of outcomes Examples: Dead/Alive, Red/Black, Heads/Tales, dice, counts, etc.  Continuous random variables have an infinite continuum of possible values. Examples: blood pressure, weight, Air Temperature, the speed of a car, the real numbers from 1 to 6.

ENGR-25_Lec-19_Statistics-1.ppt 33 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Probability Distribution Functions  A Probability Distribution Function (PDF) maps the possible values of x against their respective probabilities of occurrence, p(x)  p(x) is a number from 0 to 1.0, or alternatively, from 0% to 100%.  The area under a probability distribution function curve is always 1 (or 100%).

ENGR-25_Lec-19_Statistics-1.ppt 34 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Discrete Example: Roll The Die 1/ xp(x) 1p(x=1)=1/6 2p(x=2)=1/6 3p(x=3)=1/6 4p(x=4)=1/6 5p(x=5)=1/6 6p(x=6)=1/6

ENGR-25_Lec-19_Statistics-1.ppt 35 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Continuous Case  The probability function that accompanies a continuous random variable is a continuous mathematical function that integrates to 1.  The Probabilities associated with continuous functions are just areas under a Region of the curve (→ Definite Integrals)  Probabilities are given for a range of values, rather than a particular value e.g., the probability of getting a math SAT score between 700 and 800 is 2%).

ENGR-25_Lec-19_Statistics-1.ppt 36 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Continuous Case PDF Example  Recall the negative exponential function (in probability, this is called an “exponential distribution”):  This Function Integrates to 1 zero to infinity as required for all PDF’s

ENGR-25_Lec-19_Statistics-1.ppt 37 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Continuous Case PDF Example x p(x)=e -x 1  For example, the probability of x falling within 1 to 2:  The probability that x is any exact value (e.g.: ) is 0 we can ONLY assign Probabilities to possible RANGES of x x 1 12 p(x)=e -x NO Area Under a LINE

ENGR-25_Lec-19_Statistics-1.ppt 38 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Gaussian Curve  The Man-Height HistroGram had some Limited, and thus DISCRETE, Data  If we were to Measure 10,000 (or more) young men we would obtain a HistoGram like this  As We increase the number and fineness of the measurements The PDF approaches a CONTINUOUS Curve

ENGR-25_Lec-19_Statistics-1.ppt 39 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Gaussian Distribution  A Distribution that Describes Many Physical Processes is called the GAUSSIAN or NORMAL Distribution  Gaussian (Normal) distribution Gaussian → famous “bell-shaped curve” –Describes IQ scores, how fast horses can run, the no. of Bees in a hive, wear profile on old stone stairs... All these are cases where: –deviation from mean is equally probable in either direction –Variable is continuous (or large enough integer to look continuous)

ENGR-25_Lec-19_Statistics-1.ppt 40 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Normal Distribution  Real-valued PDF: f(x) → −∞ < x < +∞  2 independent fitting parameters: µ, σ (central location and width)  Properties: Symmetrical about Mode at µ, Median = Mean = Mode, Inflection points at ±σ  Area (probability of observing event) within: ± 1σ = ± 2σ =  For larger σ, bell shaped curve becomes wider and lower (since area =1 for any σ)

ENGR-25_Lec-19_Statistics-1.ppt 41 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Normal Distribution  Mathematically Where –σ 2 = Variance –µ = Mean  The Area Under the Curve

ENGR-25_Lec-19_Statistics-1.ppt 42 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Rule for Normal Dist 68% of the data 95% of the data 99.7% of the data σσ 2σ2σ2σ2σ 3σ3σ3σ3σ

ENGR-25_Lec-19_Statistics-1.ppt 43 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Rule in Math terms…  Using Definite-Integral Calculus

ENGR-25_Lec-19_Statistics-1.ppt 44 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods How Good is the Rule for Real?  Check some example data:  The mean, µ, of the weight of a large group of women Cross Country Runners = lbs  The standard deviation (σ) for this Group = 15.5 lbs

ENGR-25_Lec-19_Statistics-1.ppt 45 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods % of 120 =.68x120 = ~ 82 runners In fact, 79 runners fall within 1σ (15.5 lbs) of the mean

ENGR-25_Lec-19_Statistics-1.ppt 46 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods % of 120 =.95 x 120 = ~ 114 runners In fact, 115 runners fall within 2σ of the mean 158.8

ENGR-25_Lec-19_Statistics-1.ppt 47 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods % of 120 =.997 x 120 = runners In fact, all 120 runners fall within 3σ of the mean 174.3

ENGR-25_Lec-19_Statistics-1.ppt 48 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Estimating µ & σ (1)  The Location & Width Parameters, µ & σ, are Calculated from the ENTIRE POPULATION Mean, µ Variance, σ 2 Standard Deviation, σ  For LARGE Populations it is usually impractical to measure all the x k  In this case we take a Finite SAMPLE to ESTIMATE µ & σ

ENGR-25_Lec-19_Statistics-1.ppt 49 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Estimating µ & σ (2)  Say we want to characterize Miles/Yr driven by Every Licensed Driver in the USA  We assume that this is Normally Distributed, so we take a Sample of N = 1013 Drivers  We Take the Mean of the SAMPLE  Use the SAMPLE- Mean to Estimate the POPULATION-Mean

ENGR-25_Lec-19_Statistics-1.ppt 50 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Estimating µ & σ (3)  Now Calc the SAMPLE Variance & StdDev  Estimate Number decreased from N to (N – 1) To Account for case where N = 1 –In this case x-bar = x 1, and the S 2 result is meaningless standard deviation: positive square root of the variance –small std dev: observations are clustered tightly around a central value –large std dev: observations are scattered widely about the mean

ENGR-25_Lec-19_Statistics-1.ppt 51 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Sample Mean and StdDev Sample Mean Calculate the Population Variance, σ 2, from: Sample Variance But we cannot know the true population mean µ so the practical estimate for the sample variance and standard deviation would be:

ENGR-25_Lec-19_Statistics-1.ppt 52 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Error Function (erf) & Probability  Guass’s Defining Eqn  This looks a lot Like the normal dist  Now Let  Consider the Gaussian integral  Or

ENGR-25_Lec-19_Statistics-1.ppt 53 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Error Function (erf) & Probability  Subbing for x & dx  As  ReArranging

ENGR-25_Lec-19_Statistics-1.ppt 54 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Error Function (erf) & Probability  Now the Limits  Plotting  This Fcn is Symmetrical about y = 0  Recall  And the erf properties erf(0) = 0 erf(h) = 1

ENGR-25_Lec-19_Statistics-1.ppt 55 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Error Function (erf) & Probability  By Symmetry about y = 0 for  Thus  So Finally integrating − h to B

ENGR-25_Lec-19_Statistics-1.ppt 56 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Error Function (erf) & Probability  Note That for a Continuous PDF Probability that x is Less or Equal to b Probability that x is between a & b  The probability for the Normal Dist  But

ENGR-25_Lec-19_Statistics-1.ppt 57 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Error Function (erf) & Probability  If We Scale this Properly we can Cast these Eqns into the ½erf Form  MATLAB has the erf built-in, so if we have the sample Mean & StdDev We can Calc Probabilities for Normally Distributed Quantities

ENGR-25_Lec-19_Statistics-1.ppt 58 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods All Done for Today Gaussian? Or Normal?  Normal distribution was introduced by French mathematician A. De Moivre in Used to approximate probabilities of coin tossing Called it the exponential bell-shaped curve  1809, K.F. Gauss, a German mathematician, applied it to predict astronomical entities… it became known as the Gaussian distribution.  Late 1800s, most believe majority of physical data would follow the distribution  called normal distribution  Recall De Moivre’s Theorem

ENGR-25_Lec-19_Statistics-1.ppt 59 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical & Mechanical Engineer Engr/Math/Physics 25 Appendix

ENGR-25_Lec-19_Statistics-1.ppt 60 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Basic Fitting Demo File % Bruce Mayer, PE % ENGR25 * 11Apr10 % file = Demo_Basic_Fitting_Stockton_Temps_1004.m % TmaxSTK = [94, 98, 93, 94, 91, 96, 93, 87, 89, 94, 100, 99, 103, 103, 103, 97, 91, 83, 84, 90, 89, 95, 94, 99, 97, 94, 102, 103, 107, 98, 86, 89, 95, 91, 84, 93, 98, 104, 105, 107, 103, 91, 90, 96, 93, 86, 92, 93, 95, 95, 86, 81, 93, 97, 96, 97, 101, 92, 89, 92, 93, 94] Ntot = length(TmaxSTK) nday = [1:Ntot]; plot(nday, TmaxSTK, '-dk'), xlabel('No. Days after 31Jun08'), ylabel('Max. Temp (°F)'), title('Stockton, CA - Jul-Aug08')

ENGR-25_Lec-19_Statistics-1.ppt 61 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Normal or Gaussian?  Normal distribution was introduced by French mathematician A. De Moivre in Used to approximate probabilities of coin tossing Called it exponential bell-shaped curve  1809, K.F. Gauss, a German mathematician, applied it to predict astronomical entities… it became known as Gaussian distribution.  Late 1800s, most believe majority data would follow the distribution  called normal distribution

ENGR-25_Lec-19_Statistics-1.ppt 62 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Carl Friedrich Gauss

ENGR-25_Lec-19_Statistics-1.ppt 63 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Normal Dist Data Ht (in)No.Area (BW*No.)No./TotAreaBW*(No./TotArea) % % % % % % % % % % % % % % % % % % % % % % %  50.0  %

ENGR-25_Lec-19_Statistics-1.ppt 64 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods SPICE Circuit