PATTERN RECOGNITION LAB 3 TA : Nouf Al-Harbi::

Slides:



Advertisements
Similar presentations
Sampling Distributions (§ )
Advertisements

DENSITY CURVES and NORMAL DISTRIBUTIONS. The histogram displays the Grade equivalent vocabulary scores for 7 th graders on the Iowa Test of Basic Skills.
Chapter 6 Introduction to Continuous Probability Distributions
Probability Distributions
Chapter 6 The Normal Distribution and Other Continuous Distributions
Ch. 6 The Normal Distribution
Sampling Distributions
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.
Chapter 6 The Normal Distribution & Other Continuous 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.
Continuous Probability Distributions A continuous random variable can assume any value in an interval on the real line or in a collection of intervals.
Density Curve A density curve is the graph of a continuous probability distribution. It must satisfy the following properties: 1. The total area.
Slide Slide 1 Chapter 6 Normal Probability Distributions 6-1 Overview 6-2 The Standard Normal Distribution 6-3 Applications of Normal Distributions 6-4.
© Copyright McGraw-Hill CHAPTER 6 The Normal Distribution.
Section 9.3 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.
Chapter 6 The Normal Probability Distribution
Section 7.1 The STANDARD NORMAL CURVE
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 6-1 Chapter 6 The Normal Distribution and Other Continuous Distributions.
Random Variables Numerical Quantities whose values are determine by the outcome of a random experiment.
Copyright © 2014, 2013, 2010 and 2007 Pearson Education, Inc. Chapter The Normal Probability Distribution 7.
JMB Ch6 Lecture2 Review EGR 252 Spring 2011 Slide 1 Continuous Probability Distributions Many continuous probability distributions, including: Uniform.
Modular 11 Ch 7.1 to 7.2 Part I. Ch 7.1 Uniform and Normal Distribution Recall: Discrete random variable probability distribution For a continued random.
NORMAL DISTRIBUTION AND ITS APPL ICATION. INTRODUCTION Statistically, a population is the set of all possible values of a variable. Random selection of.
Copyright © 2014, 2013, 2010 and 2007 Pearson Education, Inc. Chapter The Normal Probability Distribution 7.
Basic Business Statistics
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.
Applied Quantitative Analysis and Practices
Basic Business Statistics, 11e © 2009 Prentice-Hall, Inc. Chap 6-1 The Normal Distribution.
Section 6-1 Overview. Chapter focus is on: Continuous random variables Normal distributions Overview Figure 6-1 Formula 6-1 f(x) =  2  x-x-  )2)2.
The Normal Distribution: Comparing Apples and Oranges.
Chapter 7 The Normal Probability Distribution 7.1 Properties of the Normal Distribution.
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.
PATTERN RECOGNITION LAB 2 TA : Nouf Al-Harbi::
PROBABILITY DISTRIBUTION. Probability Distribution of a Continuous Variable.
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.
Note: Normal Distribution Many sets of data collected in nature and other situations fit what is called a normal distribution. This means the data would.
Theoretical distributions: the Normal distribution.
Chapter 6 The Normal Distribution and Other Continuous Distributions
Normal Distribution Prepared by: Ameer Sameer Hamood
The Normal Probability Distribution
Normal Distribution and Parameter Estimation
Lecture Slides Elementary Statistics Twelfth Edition
Review and Preview and The Standard Normal Distribution
The Normal Distribution: Comparing Apples and Oranges
Continuous Random Variables
Properties of the Normal Distribution
STATS DAY First a few review questions.
Business Statistics, 4e by Ken Black
The Normal Probability Distribution
Continuous Random Variables
Algebra 1/4/17
The normal distribution
The Normal Probability Distribution
Chapter 6: Normal Distributions
Statistics for Managers Using Microsoft® Excel 5th Edition
PROBABILITY DISTRIBUTION
Sampling Distributions (§ )
CHAPTER – 1.2 UNCERTAINTIES IN MEASUREMENTS.
Business Statistics, 3e by Ken Black
Continuous Random Variables
Normal Distribution and Standard Deviation
The Normal Distribution
CHAPTER – 1.2 UNCERTAINTIES IN MEASUREMENTS.
Presentation transcript:

PATTERN RECOGNITION LAB 3 TA : Nouf Al-Harbi::

Lab objective:  Illustrate the normal distribution of a random variable  Draw two normal functions using the Gaussian formula 2

Theoretical Concept Part 1 3

What’s Normal distribution..?  A normal distribution is a very important statistical data distribution pattern occurring in many natural phenomena  Height, weight, people age 4

Normal distribution  Certain data, when graphed as a histogram (data on the horizontal axis, amount of data on the vertical axis), creates a bell- shaped curve known as a normal curve, or normal distribution. 5

A normal distribution of data means that most of the examples in a set of data are close to the "average," while relatively few examples tend to one extreme or the other. Normal distribution 6

 Normal distributions are symmetrical  a single central peak at the mean (average), ( μ ) of the data.  50% of the distribution lies to the left of the mean  50% lies to the right of the mean.  The spread of a normal distribution is controlled by the standard deviation, ( σ ).  The smaller the standard deviation the more concentrated the data. 7

Normal Distribution form 8

Practical Applying A. Using randn function Part 2 9

Normal distribution using randn 1. Generate N random values normally distributed where mu=20, sigma=2 2. Find the frequency distribution of each outcome (i.e. how many times each outcome occur?) 3. Find the probability density function p(x) 10

randn  generates random numbers drawn from the normal distribution N(0,1), i.e., with mean ( μ ) = 0 and standard deviation ( σ ) =1  Write the following in Matlab & see the result:  r = randn(1,6)  generates 1-D array of one row and 6columns  To change the normal parameters we can use fix function  11

fix  x=fix( σ * r + μ )  x = fix( 2* r + 20);  Writing the previous line convert r into random values normally distributed with  mean ( μ ) = 20  standard deviation ( σ ) =2 12

N= ; mu = 20; % mean. sigma = 2; % standard deviation. r = randn(1,N); x = fix( sigma * r + mu ); xmax = max(x); f=zeros(1,xmax); for i=1:N j = x(i); f(j) = f(j)+1; end plot(f) p = f / N; figure, plot(p) Full code 13

Practical Applying B. Using Gaussian(normal) formula Part 2 14

Using Gaussian(normal) formula 15  Instead of generating random values normally distributed (using randn), we can use:  Gaussian formula :

Draw 2 normal functions using Gaussian formula For first normal function : N(20,2)  Mu1=20 sigma1=2  X=1:40  Apply Gaussian Formula 2. For second normal function :N(15,1.5)  Mu2=15 sigma2=1.5  X=1:40  Apply Gaussian Formula 3. Plot the normal functions

mu1 = 20; sigma1 = 2; p1 = zeros(1,40); for x = 1:40 p1(x) = (1/sqrt(2*pi*sigma1))*exp(-(x-mu1)^2/(2*sigma1)); End mu2 = 30; sigma2 = 1.5; p2 = zeros(1,40); for x = 1:40 p2(x) = (1/sqrt(2*pi*sigma2))*exp(-(x-mu2)^2/(2*sigma2)); end x=1:40; plot(x,p1,'r-',x,p2,'b-') Full code 17

Write a Matlab function that compute the value of the Gaussian distribution for a given x. That is a function that accept the values of x, mu, and sigma, then return the value of N(mu,sigma) at the value of x. For example: call the function normalfn(x,mu,sigma). Then use it by issuing the command >>normalfn(15, 20,3). %this should return the values of this pdf at x =15. Then, use this function to write another function to draw the normal distribution N(20,2), i.e., with normal distribution with mean = 20 and standard deviation = 2. H.W 2 18