SlideShare a Scribd company logo
1 of 26
Data Science Internship
UNDERSTANDING UNIVARIATE & MULTIVARIATE NORMAL DISTRIBUTIONS
UZMA SULTHANA
LECTURE
DEPT OF CSE,
RAMAIAH INSTITUTE OF TECHNOLOGY, BANGALORE
Content
• Introduction
• Normal Distributions
• Univariate Normal Distributions
• Multivariate Norma Distributions
Introduction
 In Statics when we use the term distribution
 Examples are
Definition of Distribution
A distribution is a function that shows the possible
values for a variable and how often they occur.
Example-Rolling die
It has six sides, numbered from 1 to 6.
Imagine that we roll the die. What is the
probability of getting 1?
Example-Rolling die
Try guessing what the probability of rolling a 2 is. Once again - one-sixth. The same holds true for 3, 4, 5 and
6.
Example-Rolling die
It is impossible to get a 7 when rolling a single die.
Therefore, the probability is 0.
Example-Rolling die
The Values that Make up a Distribution
• Let’s generalize. The distribution of an event consists not only of the input values that can be
observed.
• It is actually made up of all possible values. So, the distribution of the event - rolling a die -
will be given by the following table.
Example-Rolling die
Visual Representation of probability distribution ----
Uniform Distribution.
Normal Distribution
Visual Representation of Normal distribution
The statistical term for it
is Gaussian distribution.
Though, many people call it
the Bell Curve, as it is shaped
like a bell.
Normal Distribution
Visual Representation of Normal distribution
The statistical term for it is Gaussian distribution. Though, many
people call it the Bell Curve, as it is shaped like a bell.
Normal Distribution
It is symmetrical and its mean, median and mode are equal.
skewness indicates whether the
observations in a data set are concentrated
on one side.
It is perfectly centred around its mean.
Normal Distribution
How it’s Denoted
N stands for normal and the tilde sign(~) shows it is a distribution. In brackets, we have the mean(μ) and
the variance(σ2) of the distribution
you can notice that
the highest point is
located at the mean.
This is because it
coincides with
the mode. The
spread of the graph is
determined by
the standard
deviation, as it is
shown below.
Normal Distribution-R
• In a random collection of data from independent source, it is general observed that the distribution of
data is normal
• We observed in the graph, 50% of values lie to the left of the mean and other 50% lie to the right of the
graph
• R has 4 build functions to generate normal distribution:
• X= vector of a numbers
• p=vector of probabilities
• n=Number of observations (sample size)
• mean=mean value of the sample data. By default is zero
• sd=standard deviation. Its defalult value is one.
Normal Distribution-R
dnorm()
For example:
Create a sequence of numbers between -20 and 20 incrementing by 0.1.
mean=5.o, sd=1.0
x <- seq(-20, 20, by = .1)
y <- dnorm(x, mean = 5.0, sd = 1.0)
plot(x,y, main = "Normal Distribution", col = "blue")
Normal Distribution-R
For example:
Create a sequence of numbers between -20 and 20 incrementing by 0..
mean=2.5, sd=2
x <- seq(-10, 10, by = .2)
y <- pnorm(x, mean = 2.5, sd = 2.0)
plot(x,y, main = “pnorm()", col = "blue")
Normal Distribution-R
For example:
Create a sequence of numbers between 0 and 1 incrementing by 0.02.
mean=2, sd=1
x <- seq(0, 1, by = 0.02)
y <- qnorm(x, mean = 2, sd = 1) #DataFlair
plot(x,y, main = "qnorm()", col = "blue")
Normal Distribution-R
For example:
Create a sample of 50 numbers which are normally distributed.
y <- rnorm(50)
hist(y, main = “rnorm()", col = "darkorange")
Normal Distributions
The normal Distributions:
1.Univariate Normal Distribution
2.Bivariate Normal Distribution
3.Multivariate Normal Distribution
1.Univariate Normal Distribution
• The univariate normal distribution, also known as the
Gaussian distribution, is a continuous probability
distribution that describes the distribution of a single
random variable.
• It is one of the most important and widely used probability
distributions in statistics and data analysis.
1.Univariate Normal Distribution
• The distribution is characterized by its bell-shaped curve
when plotted, which is symmetric around the mean value.
Key characteristics of the univariate normal
distribution include:
1.Symmetry: The distribution is symmetric around its mean value, meaning that the data tend to be evenly
distributed on both sides of the mean.
2.Mean, Median, and Mode: The mean (average), median (middle value), and mode (most frequent value) are
all located at the center of the distribution, and they are equal in a perfectly normal distribution.
3.Standard Deviation: The standard deviation controls the spread of the distribution. A larger standard
deviation results in a wider curve, indicating more variability in the data.
4.68-95-99.7 Rule: Around 68% of the data falls within one standard deviation of the mean, approximately
95% within two standard deviations, and about 99.7% within three standard deviations.
5.Probability Density Function (PDF): The PDF of the normal distribution is a mathematical function that
defines the likelihood of observing a particular value. It's given by the formula Where
μ = Mean
σ = Standard deviation
x = Normal random variable
Key characteristics of the univariate normal
distribution include:
Example 1: Height of Adults Suppose you're measuring the heights of a large group of
adult individuals. The distribution of heights is often well-modeled by a normal distribution.
The mean (μ) might represent the average height in the population, and the standard
deviation (σ) would indicate how much the heights tend to vary around the mean.
Example 2: Exam Scores Consider a classroom where students take an exam. If the exam
is well-constructed and not too difficult or too easy, the scores of the students might follow a
normal distribution. The mean score would represent the average performance, and the
standard deviation would describe the spread of scores around the mean.
Example 3: IQ Scores IQ scores are often assumed to follow a normal distribution. If the
mean IQ is 100 and the standard deviation is 15, then most people would have IQ scores
close to 100, with fewer individuals having scores much lower or higher.
Key characteristics of the univariate normal
distribution include:
Example 4: Measurement Errors Imagine you're measuring the length of an object using a
ruler with small markings. Due to limitations in precision, there might be small errors in
your measurements. These errors can be modeled using a normal distribution, where the
mean error is close to zero.
Example 5: Random Walks In finance and stock market analysis, random walks are often
used to model the unpredictable changes in stock prices. The daily changes in stock prices
can sometimes be approximated by a normal distribution, which helps in understanding the
likelihood of different price changes.
Key characteristics of the univariate normal
distribution include:
1.# Generate random samples
2.random_samples <- rnorm(1000, mean = 0, sd = 1)
3.# Calculate probability
4.probability_less_than_1 <- pnorm(1, mean = 0, sd = 1)
5.# Create visualization
6.library(ggplot2)
7.ggplot(data.frame(x = random_samples), aes(x)) +
8. geom_histogram(aes(y = ..density..), bins = 30, fill = "lightblue", color = "black") +
9. geom_density(color = "red") +
10. labs(title = "Univariate Normal Distribution", x = "Value", y = "Density")
Key characteristics of the univariate normal
distribution include:

More Related Content

Similar to Understanding univariate and multivariate normal distributions

G4 PROBABLITY.pptx
G4 PROBABLITY.pptxG4 PROBABLITY.pptx
G4 PROBABLITY.pptxSmitKajbaje1
 
1.1 course notes inferential statistics
1.1 course notes inferential statistics1.1 course notes inferential statistics
1.1 course notes inferential statisticsDjamel Bob
 
Business statistics
Business statisticsBusiness statistics
Business statisticsRavi Prakash
 
Lecture 4 - probability distributions (2).pptx
Lecture 4 - probability distributions (2).pptxLecture 4 - probability distributions (2).pptx
Lecture 4 - probability distributions (2).pptxSinimol Aniyankunju
 
Presentation research- chapter 10-11 istiqlal
Presentation research- chapter 10-11 istiqlalPresentation research- chapter 10-11 istiqlal
Presentation research- chapter 10-11 istiqlalIstiqlalEid
 
Ch2 Data Description
Ch2 Data DescriptionCh2 Data Description
Ch2 Data DescriptionFarhan Alfin
 
ststs nw.pptx
ststs nw.pptxststs nw.pptx
ststs nw.pptxMrymNb
 
Statistics (GE 4 CLASS).pptx
Statistics (GE 4 CLASS).pptxStatistics (GE 4 CLASS).pptx
Statistics (GE 4 CLASS).pptxYollyCalamba
 
Basic Statistical Descriptions of Data.pptx
Basic Statistical Descriptions of Data.pptxBasic Statistical Descriptions of Data.pptx
Basic Statistical Descriptions of Data.pptxAnusuya123
 
2. chapter ii(analyz)
2. chapter ii(analyz)2. chapter ii(analyz)
2. chapter ii(analyz)Chhom Karath
 
Introduction to statistics
Introduction to statisticsIntroduction to statistics
Introduction to statisticsKapil Dev Ghante
 
M.Ed Tcs 2 seminar ppt npc to submit
M.Ed Tcs 2 seminar ppt npc   to submitM.Ed Tcs 2 seminar ppt npc   to submit
M.Ed Tcs 2 seminar ppt npc to submitBINCYKMATHEW
 
Lect 3 background mathematics
Lect 3 background mathematicsLect 3 background mathematics
Lect 3 background mathematicshktripathy
 
MEASURE-OF-VARIABILITY- for students. Ppt
MEASURE-OF-VARIABILITY- for students. PptMEASURE-OF-VARIABILITY- for students. Ppt
MEASURE-OF-VARIABILITY- for students. PptPrincessjaynoviaKali
 

Similar to Understanding univariate and multivariate normal distributions (20)

G4 PROBABLITY.pptx
G4 PROBABLITY.pptxG4 PROBABLITY.pptx
G4 PROBABLITY.pptx
 
1.1 course notes inferential statistics
1.1 course notes inferential statistics1.1 course notes inferential statistics
1.1 course notes inferential statistics
 
Statistics four
Statistics fourStatistics four
Statistics four
 
Business statistics
Business statisticsBusiness statistics
Business statistics
 
Statr sessions 4 to 6
Statr sessions 4 to 6Statr sessions 4 to 6
Statr sessions 4 to 6
 
Lecture 4 - probability distributions (2).pptx
Lecture 4 - probability distributions (2).pptxLecture 4 - probability distributions (2).pptx
Lecture 4 - probability distributions (2).pptx
 
Presentation research- chapter 10-11 istiqlal
Presentation research- chapter 10-11 istiqlalPresentation research- chapter 10-11 istiqlal
Presentation research- chapter 10-11 istiqlal
 
Presentation1
Presentation1Presentation1
Presentation1
 
Basic statistics
Basic statisticsBasic statistics
Basic statistics
 
Ch2 Data Description
Ch2 Data DescriptionCh2 Data Description
Ch2 Data Description
 
ststs nw.pptx
ststs nw.pptxststs nw.pptx
ststs nw.pptx
 
Statistics (GE 4 CLASS).pptx
Statistics (GE 4 CLASS).pptxStatistics (GE 4 CLASS).pptx
Statistics (GE 4 CLASS).pptx
 
Basic Statistical Descriptions of Data.pptx
Basic Statistical Descriptions of Data.pptxBasic Statistical Descriptions of Data.pptx
Basic Statistical Descriptions of Data.pptx
 
2. chapter ii(analyz)
2. chapter ii(analyz)2. chapter ii(analyz)
2. chapter ii(analyz)
 
Introduction to statistics
Introduction to statisticsIntroduction to statistics
Introduction to statistics
 
Descriptive Statistics
Descriptive StatisticsDescriptive Statistics
Descriptive Statistics
 
M.Ed Tcs 2 seminar ppt npc to submit
M.Ed Tcs 2 seminar ppt npc   to submitM.Ed Tcs 2 seminar ppt npc   to submit
M.Ed Tcs 2 seminar ppt npc to submit
 
Lect 3 background mathematics
Lect 3 background mathematicsLect 3 background mathematics
Lect 3 background mathematics
 
MEASURE-OF-VARIABILITY- for students. Ppt
MEASURE-OF-VARIABILITY- for students. PptMEASURE-OF-VARIABILITY- for students. Ppt
MEASURE-OF-VARIABILITY- for students. Ppt
 
R training4
R training4R training4
R training4
 

Recently uploaded

ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 

Recently uploaded (20)

ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 

Understanding univariate and multivariate normal distributions

  • 1. Data Science Internship UNDERSTANDING UNIVARIATE & MULTIVARIATE NORMAL DISTRIBUTIONS UZMA SULTHANA LECTURE DEPT OF CSE, RAMAIAH INSTITUTE OF TECHNOLOGY, BANGALORE
  • 2. Content • Introduction • Normal Distributions • Univariate Normal Distributions • Multivariate Norma Distributions
  • 3. Introduction  In Statics when we use the term distribution  Examples are
  • 4. Definition of Distribution A distribution is a function that shows the possible values for a variable and how often they occur.
  • 5. Example-Rolling die It has six sides, numbered from 1 to 6. Imagine that we roll the die. What is the probability of getting 1?
  • 6. Example-Rolling die Try guessing what the probability of rolling a 2 is. Once again - one-sixth. The same holds true for 3, 4, 5 and 6.
  • 7. Example-Rolling die It is impossible to get a 7 when rolling a single die. Therefore, the probability is 0.
  • 8. Example-Rolling die The Values that Make up a Distribution • Let’s generalize. The distribution of an event consists not only of the input values that can be observed. • It is actually made up of all possible values. So, the distribution of the event - rolling a die - will be given by the following table.
  • 9. Example-Rolling die Visual Representation of probability distribution ---- Uniform Distribution.
  • 10. Normal Distribution Visual Representation of Normal distribution The statistical term for it is Gaussian distribution. Though, many people call it the Bell Curve, as it is shaped like a bell.
  • 11. Normal Distribution Visual Representation of Normal distribution The statistical term for it is Gaussian distribution. Though, many people call it the Bell Curve, as it is shaped like a bell.
  • 12. Normal Distribution It is symmetrical and its mean, median and mode are equal. skewness indicates whether the observations in a data set are concentrated on one side. It is perfectly centred around its mean.
  • 13. Normal Distribution How it’s Denoted N stands for normal and the tilde sign(~) shows it is a distribution. In brackets, we have the mean(μ) and the variance(σ2) of the distribution you can notice that the highest point is located at the mean. This is because it coincides with the mode. The spread of the graph is determined by the standard deviation, as it is shown below.
  • 14. Normal Distribution-R • In a random collection of data from independent source, it is general observed that the distribution of data is normal • We observed in the graph, 50% of values lie to the left of the mean and other 50% lie to the right of the graph • R has 4 build functions to generate normal distribution: • X= vector of a numbers • p=vector of probabilities • n=Number of observations (sample size) • mean=mean value of the sample data. By default is zero • sd=standard deviation. Its defalult value is one.
  • 15. Normal Distribution-R dnorm() For example: Create a sequence of numbers between -20 and 20 incrementing by 0.1. mean=5.o, sd=1.0 x <- seq(-20, 20, by = .1) y <- dnorm(x, mean = 5.0, sd = 1.0) plot(x,y, main = "Normal Distribution", col = "blue")
  • 16. Normal Distribution-R For example: Create a sequence of numbers between -20 and 20 incrementing by 0.. mean=2.5, sd=2 x <- seq(-10, 10, by = .2) y <- pnorm(x, mean = 2.5, sd = 2.0) plot(x,y, main = “pnorm()", col = "blue")
  • 17. Normal Distribution-R For example: Create a sequence of numbers between 0 and 1 incrementing by 0.02. mean=2, sd=1 x <- seq(0, 1, by = 0.02) y <- qnorm(x, mean = 2, sd = 1) #DataFlair plot(x,y, main = "qnorm()", col = "blue")
  • 18. Normal Distribution-R For example: Create a sample of 50 numbers which are normally distributed. y <- rnorm(50) hist(y, main = “rnorm()", col = "darkorange")
  • 19. Normal Distributions The normal Distributions: 1.Univariate Normal Distribution 2.Bivariate Normal Distribution 3.Multivariate Normal Distribution
  • 20. 1.Univariate Normal Distribution • The univariate normal distribution, also known as the Gaussian distribution, is a continuous probability distribution that describes the distribution of a single random variable. • It is one of the most important and widely used probability distributions in statistics and data analysis.
  • 21. 1.Univariate Normal Distribution • The distribution is characterized by its bell-shaped curve when plotted, which is symmetric around the mean value.
  • 22. Key characteristics of the univariate normal distribution include: 1.Symmetry: The distribution is symmetric around its mean value, meaning that the data tend to be evenly distributed on both sides of the mean. 2.Mean, Median, and Mode: The mean (average), median (middle value), and mode (most frequent value) are all located at the center of the distribution, and they are equal in a perfectly normal distribution. 3.Standard Deviation: The standard deviation controls the spread of the distribution. A larger standard deviation results in a wider curve, indicating more variability in the data. 4.68-95-99.7 Rule: Around 68% of the data falls within one standard deviation of the mean, approximately 95% within two standard deviations, and about 99.7% within three standard deviations. 5.Probability Density Function (PDF): The PDF of the normal distribution is a mathematical function that defines the likelihood of observing a particular value. It's given by the formula Where μ = Mean σ = Standard deviation x = Normal random variable
  • 23. Key characteristics of the univariate normal distribution include: Example 1: Height of Adults Suppose you're measuring the heights of a large group of adult individuals. The distribution of heights is often well-modeled by a normal distribution. The mean (μ) might represent the average height in the population, and the standard deviation (σ) would indicate how much the heights tend to vary around the mean. Example 2: Exam Scores Consider a classroom where students take an exam. If the exam is well-constructed and not too difficult or too easy, the scores of the students might follow a normal distribution. The mean score would represent the average performance, and the standard deviation would describe the spread of scores around the mean. Example 3: IQ Scores IQ scores are often assumed to follow a normal distribution. If the mean IQ is 100 and the standard deviation is 15, then most people would have IQ scores close to 100, with fewer individuals having scores much lower or higher.
  • 24. Key characteristics of the univariate normal distribution include: Example 4: Measurement Errors Imagine you're measuring the length of an object using a ruler with small markings. Due to limitations in precision, there might be small errors in your measurements. These errors can be modeled using a normal distribution, where the mean error is close to zero. Example 5: Random Walks In finance and stock market analysis, random walks are often used to model the unpredictable changes in stock prices. The daily changes in stock prices can sometimes be approximated by a normal distribution, which helps in understanding the likelihood of different price changes.
  • 25. Key characteristics of the univariate normal distribution include: 1.# Generate random samples 2.random_samples <- rnorm(1000, mean = 0, sd = 1) 3.# Calculate probability 4.probability_less_than_1 <- pnorm(1, mean = 0, sd = 1) 5.# Create visualization 6.library(ggplot2) 7.ggplot(data.frame(x = random_samples), aes(x)) + 8. geom_histogram(aes(y = ..density..), bins = 30, fill = "lightblue", color = "black") + 9. geom_density(color = "red") + 10. labs(title = "Univariate Normal Distribution", x = "Value", y = "Density")
  • 26. Key characteristics of the univariate normal distribution include: