0% found this document useful (0 votes)
3 views

Lesson-3.3-Probability-Normal-Distribution-Linear-Regression-and-Correlation

This document covers key concepts in data management, including probability, normal distribution, linear regression, and correlation. It explains unconditional and conditional probabilities, characteristics of normal distributions, and how to calculate correlation coefficients and regression lines. Examples are provided to illustrate these concepts and their applications in analyzing data.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lesson-3.3-Probability-Normal-Distribution-Linear-Regression-and-Correlation

This document covers key concepts in data management, including probability, normal distribution, linear regression, and correlation. It explains unconditional and conditional probabilities, characteristics of normal distributions, and how to calculate correlation coefficients and regression lines. Examples are provided to illustrate these concepts and their applications in analyzing data.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

DATA MANAGEMENT

LESSON 3.3
PROBABIITY, NORMAL DISTRIBUTION, LINEAR
REGRESSION, AND CORRELATION
PROBABILITY AND
NORMAL DISTRIBUTION
Probability is the chance or likelihood of an event to happen.
It can be expressed as proportions from 0 to 1 or
percentages from 0% to 100%. A probability of 0 indicates
that the event doesn’t have the chance to occur, whereas a
probability of 1 indicates that the event will certainly happen.
Unconditional Probability
An unconditional probability is the chance that a single
outcome results among several possible outcomes. The
term refers to the likelihood that an event will take place
irrespective of whether any other events have taken place or
any other conditions are present.
Number of Times 𝐴 Occurs
𝑃(𝐴)=
Total Number of Possible Outcomes
Example 1. Data below show the number of gadget addictiveness
among children 5-10 years of age who are seeking medical care.
Using the data given below, determine the following:
1. What is the probability of selecting a boy?
2. What is the probability of selecting a 7-year old?
3. What is the probability of selecting a girl?
4. What is the probability of selecting a boy who is 10 years of age?

Age (years) Total


5 6 7 8 9 10
Boys 431 380 500 411 421 417 2560

Girls 409 512 413 435 460 501 2730

Totals 840 892 913 846 881 918 5290


Conditional Probability
A conditional probability is the probability of an event
occurring, given that another event has already occurred.
The conditional probability of event B occurring, given that
event A has occurred, is denoted by and is read as
“probability of B, given A.”
Age (years) Total
5 6 7 8 9 10
Boys 431 380 500 411 421 417 2560

Girls 409 512 413 435 460 501 2730

Totals 840 892 913 846 881 918 5290

Example 2. What is the probability of selecting a 9-year old child


given that she is a girl?

Example 3. What is the probability of selecting a boy given that he is


6 years old?
Normal Distribution
Characteristics of a Normal Distribution

Normal distributions are:


1. Symmetric: a normal distribution is perfectly symmetrical
around its center. That is, the right side of the center is a
mirror image of the left side.
2. Unimodal: There is only one mode in a normal distribution.
3. Asymptotic: The extremes come closer and closer to the
horizontal line, but it never touches.
4. Equal values of the mean, median, and mode
Example 1. The test scores of a Math class with 800
students are distributed normally with a mean of 75
and a standard deviation of 7. (a) What percentage of
the class has a test score between 68 and 82? (b)
Approximately how many students have a test score
between 61 and 89? (c) What is the probability that a
students chosen at random has a test score between
54 and 75? (d) Approximately how many students
have a test score greater than or equal to 96?
Area Under the Unit
Normal Curve
The area under the unit normal curve may represent several
things like the probability of an event, the percentile rank of a
score, or the percentage distribution of a whole population.
For instance, the area under the curve from z = z1 to z = z2 ,
which is the shaded region in the figure below may represent
the probability that z assumes a value between z1 and z2 .
Example 1. Find the area between 𝑧 = 0 and 𝑧 = 1.
Example 2. Find the area between 𝑧 = −1 and 𝑧 = 0.
Example 3. Find the area below 𝑧 = −1.
Example 4. Find the area between 𝑧 = −0.70 and 𝑧 = 1.25.
Example 5. Find the area between 𝑧 = 0 and 𝑧 = 0.68 and
𝑧 = 1.56.
Example 6. You join in a crab catching contest. The sizes
of the crabs are normally distributed with a mean of 16
cm and a standard deviation of 4. What is the chance of
catching crabs that are less than 6 cm? What is the
chance of winning a prize if the prize is offered for any
crabs over 25 cm? What is the chance of catching crabs
between 19 cm and 24 cm?
Correlation

A correlation is a relationship between two variables. The


data can be represented by the ordered pairs (x, y) where x
is the independent (or explanatory) variable, and y is the
dependent (or response) variable.
y
A scatter plot can be used to
determine whether a linear
2
(straight line) correlation exists
between two variables. x
Example: 2 4 6

x 1 2 3 4 5 –2

y –4 –2 –1 0 2
–4
Linear Correlation

y y
As x increases, As x increases,
y tends to y tends to
decrease. increase.

x x
Negative Linear Correlation Positive Linear Correlation
y y

x x
No Correlation Nonlinear Correlation
Correlation Coefficient

The correlation coefficient is a measure of the strength and


the direction of a linear relationship between two variables.
The symbol r represents the sample correlation coefficient.
The formula for r is

𝑛∑𝑥𝑦 − ∑𝑥 ∑𝑦
𝑟= .
𝑛∑𝑥 2 − ∑𝑥 2 [𝑛∑𝑦 2 − ∑𝑦 2 ]

The range of the correlation coefficient is −1 to 1. If x and y


have a strong positive linear correlation, r is close to 1. If x
and y have a strong negative linear correlation, r is close to
−1. If there is no linear correlation or a weak linear
correlation, r is close to 0.
Interpreting Correlation Coefficient

Size of Correlation Interpretation


0.90 to 1.00 (-.90 to -1.00) Very strong positive (negative)
correlation
0.70 to 0.89 (-.70 to -.89) Strong positive (negative) correlation

0.50 to 0.69 (-.50 to -.69) Moderate positive (negative)


correlation
0.30 to 0.49 (-.30 to -.49) Weak positive (negative) correlation

0.00 to 0.29 (0.00 to -.29) Little if any correlation


Linear Correlation
y
y

r = −0.91 r = 0.88

x
x
Very strong negative correlation
Strong positive correlation
y
y
r = 0.42
r = 0.07

x
x
Weak positive correlation
No Correlation
Calculating a Correlation Coefficient
Calculating a Correlation Coefficient
In Words In Symbols
1. Find the sum of the x-values. x
2. Find the sum of the y-values. y
3. Multiply each x-value by its  xy
corresponding y-value and find the sum.
4. Square each x-value and find the sum.
5. Square each y-value and find the sum. x 2
6. Use these five sums to calculate y2
the correlation coefficient. r=
n  xy − ( x )( y )
.
n  x − ( x ) n  y − ( y )
2 2 2 2

Continued.
Example:
Calculate the correlation coefficient r for the following data.
x y xy x2 y2
1 –3 –3 1 9
2 –1 –2 4 1
3 0 0 9 0
4 1 4 16 1
5 2 10 25 4
 x = 15  y = −1  xy = 9  x 2 = 55  y 2 = 15

n  xy − ( x )( y ) 5(9) − (15) (−1)


r= =
n  x 2 − ( x ) n  y 2 − ( y ) 5(55) − 152 5(15) − (−1)
2 2 2

60 There is a very strong


=  0.986
50 74 positive linear correlation
between x and y.
Example:
The following data represents the number of hours 12
different students watched television during the
weekend and the scores of each student who took a test
the following Monday.
a.) Display the scatter plot.
b.) Calculate the correlation coefficient r and interpret
the result.
Hours, x 0 1 2 3 3 5 5 5 6 7 7 10
Test score, y 96 85 82 74 95 68 76 84 58 65 75 50

Continued.
Example continued:
Hours, x 0 1 2 3 3 5 5 5 6 7 7 10
Test score, y 96 85 82 74 95 68 76 84 58 65 75 50
y
100
80
Test score

60
40
20
x
2 4 6 8 10
Hours watching TV
Continued.
Example continued:
Hours, x 0 1 2 3 3 5 5 5 6 7 7 10
Test score, y 96 85 82 74 95 68 76 84 58 65 75 50
xy 0 85 164 222 285 340 380 420 348 455 525 500
x2 0 1 4 9 9 25 25 25 36 49 49 100
y2 9216 7225 6724 5476 9025 4624 5776 7056 3364 4225 5625 2500

 x = 54  y = 908  xy = 3724  x 2 = 332  y 2 = 70836

n  xy − ( x )( y ) 12(3724) − (54) (908)


r= =  −0.831
n  x − ( x ) n  y − ( y ) 12(70836) − (908)
2 2 2 2 2 2
12(332) − 54

There is a strong negative linear correlation.


As the number of hours spent watching TV increases, the
test scores tend to decrease.
Linear Regression
Residuals
After verifying that the linear correlation between two
variables is significant, next we determine the equation of
the line that can be used to predict the value of y for a
given value of x.
Observed
y
y-value

d2 For a given x-value,


d1
d = (observed y-value) – (predicted y-value)

Predicted d
3
y-value
x
Each data point di represents the difference between the
observed y-value and the predicted y-value for a given x-
value on the line. These differences are called residuals.
Regression Line
A regression line, also called a line of best fit, is the line
for which the sum of the squares of the residuals is a
minimum.
The Equation of a Regression Line
The equation of a regression line for an independent variable
x and a dependent variable y is
ŷ = mx + b
where ŷ is the predicted y-value for a given x-value. The
slope m and y-intercept b are given by
n  xy − ( x )( y ) y x
m= and b = y − mx = − m
n  x 2 − ( x )
2 n n
where y is the mean of the y - values and x is the mean of the
x - values. The regression line always passes through (x , y ).
Example:
Find the equation of the regression line.
x y xy x2 y2
1 –3 –3 1 9
2 –1 –2 4 1
3 0 0 9 0
4 1 4 16 1
5 2 10 25 4
 x = 15  y = −1  xy = 9  x 2 = 55  y 2 = 15

n  xy − ( x )( y ) 5(9) − (15)(−1) 60


m= = = = 1.2
n  x − ( x )
2 2
5(55) − (15)
2 50
Continued.
Example continued:
−1 15
b = y − mx = − (1.2) = −3.8
5 5
The equation of the regression line is
ŷ = 1.2x – 3.8. y
2
1
x
1 2 3 4 5

( )
−1
−1
−2 (x , y ) = 3,
5
−3
Example:
The following data represents the number of hours 12
different students watched television during the
weekend and the scores of each student who took a test
the following Monday.
a.) Find the equation of the regression line.
b.) Use the equation to find the expected test score
for a student who watches 9 hours of TV.
Hours, x 0 1 2 3 3 5 5 5 6 7 7 10
Test score, y 96 85 82 74 95 68 76 84 58 65 75 50
xy 0 85 164 222 285 340 380 420 348 455 525 500
x2 0 1 4 9 9 25 25 25 36 49 49 100
y2 9216 7225 6724 5476 9025 4624 5776 7056 3364 4225 5625 2500

 x = 54  y = 908  xy = 3724  x 2 = 332  y 2 = 70836


Example continued:
n  xy − ( x )( y ) 12(3724) − (54)(908)
m= =  −4.067
n  x − ( x ) 12(332) − (54)
2 2 2

y
b = y − mx
908 54
100 (x , y ) = (1254 , 908
12 )
 (4.5,75.7)

= − (−4.067) 80
12 12

Test score
60
 93.97
40

ŷ = –4.07x + 93.97 20
x
2 4 6 8 10
Hours watching TV
Continued.
Example continued:
Using the equation ŷ = –4.07x + 93.97, we can predict
the test score for a student who watches 9 hours of TV.

ŷ = –4.07x + 93.97
= –4.07(9) + 93.97
= 57.34
= 57
A student who watches 9 hours of TV over the weekend
can expect to receive about 57 points on Monday’s test.
The coefficient of determination r2 is the ratio of the
explained variation to the total variation. That is,
r 2 = Explained variation
Total variation

Example:
The correlation coefficient for the data that represents
the number of hours students watched television and the
test scores of each student is r  −0.831. Find the
coefficient of determination.
r 2  (−0.831)2 About 69.1% of the variation in the test
scores can be explained by the variation
 0.691
in the hours of TV watched. About 30.9%
of the variation is unexplained.

You might also like