Upload
fizjadoon
View
185
Download
0
Embed Size (px)
Citation preview
FIZZA SARFARAZ ABBOTTABAD UNIVERSITY OF SCIENCE & TECHNOLOGY (A.U.S.T)
CORRELATION
HISTORYGALTON:Obsessed with measurement Tried to measure everything from the weather to female beauty Invented correlation and regression KARL PEARSONformalized Galton's methodinvented method
CORRELATION
Measure of the degree to which any two variables vary together.orSimultaneously variation of variables in some direction.e.g., iron bar
INTRODUCTIONAssociation b/w two variablesNature & strength of
relationship b/w two variablesBoth random variablesLies b/w +1 & -10 = No relationship b/w
variables-1 = Perfect Negative
correlation+1 = Perfect positive
correlation
Ice-cream - Temperature
MATHEMATICALLY
ny)(
y.nx)(
x
nyx
xyr
22
22
EXAMPLEAnxiety Anxiety
(X)(X)Test Test
score (Y)score (Y)XX22 YY22 XYXY
1010 22 100100 44 202088 33 6464 99 242422 99 44 8181 181811 77 11 4949 7755 66 2525 3636 303066 55 3636 2525 3030
∑∑X = 32X = 32 ∑∑Y = 32Y = 32 ∑∑XX22 = 230 = 230 ∑∑YY22 = 204 = 204 ∑∑XY=12XY=1299
Calculating Correlation Calculating Correlation CoefficientCoefficient
94.)200)(356(
102477432)204(632)230(6
)32)(32()129)(6(22
r
r = - 0.94
Indirect strong correlation
METHODS OF STUDYING CORRELATION
METHODS
SCATTER DIAGRAM
KARL PEARSON COEFFICIENT
SPEARMAN'S RANK
SCATTER DIAGRAM
Rectangular coordinate
Two quantitative variables
1 variable: independent (X) & 2nd:
dependent (Y)
Points are not joined
KARL PEARSON COEFFICIENT
• Statistic showing the degree of relationship b/w two variables.
• represented by 'r'• called Pearson's correlation
SPEARMAN'S RANKActual measurement of objects/individuals Actual measurement of objects/individuals
not availablenot availableAccurate assesment is not possibleAccurate assesment is not possibleArranged in orderArranged in orderOrdered arrangement: RankingOrdered arrangement: RankingOrder Given to object: RanksOrder Given to object: RanksCorrelation blw two sets X & Y: Rank Correlation blw two sets X & Y: Rank
correlationcorrelation
PROCEDURE
Rank values of X from 1-n Rank values of X from 1-n n: # of pairs of values of X & Yn: # of pairs of values of X & Y Rank Y from 1-nRank Y from 1-n Compute value of 'di' by Xi - YiCompute value of 'di' by Xi - Yi Square each di & compute ∑diSquare each di & compute ∑di22
Apply formula; Apply formula; 2
s 2
6 (di)r 1
n(n 1)
EXAMPLE In a study of the relationship between level education and In a study of the relationship between level education and
income the following data was obtained. Find the relationship income the following data was obtained. Find the relationship between them and comment.between them and comment.
samplenumbers
level education(X)
Income(Y)
A Preparatory.Preparatory. 25B Primary.Primary. 10C University.University. 8D secondarysecondary 10E secondarysecondary 15F illitilliterateerate 50G University.University. 60
X Y rankX
rankY
di di2
A Preparatory
25 5 3 2 4
B Primary 10 6 5.5 0.5 0.25
C University 8 1.5 7 -5.5 30.25
D secondary 10 3.5 5.5 -2 4
E secondary 15 3.5 4 -0.5 0.25
F illiterate 50 7 2 5 25G university 60 1.5 1 0.5 0.25
∑ di2=64
Conclusion:Conclusion:There is an indirect weak correlation There is an indirect weak correlation
between level of education and income.between level of education and income.
1.0)48(7
6461
sr
TYPES
Types
Type 1 Type 2 Type 3
TYPE 1
Type 1
Negative NO Perfect
Positive
• POSITIVE - both either increase or decrease
• NEGATIVE - one increase while other decrease
• NO - no correlation• PERFECT - both
variables are independents
EXAMPLES
+ive Relationships• WAter consumption
& temperature• Study times &
grades
-ive Relationships• Alcohol
consumption & driving ability
• Price & Quantity demanded
TYPE 2
Type 2
Linear
Non-linear
• LINEAR - Perfect straight line on graph
• NON-LINEAR - Not a perfect straight line
TYPE 3
Type 3
Simple Multiple Partial
• SIMPLE - 1 independent & 1 dependent variable
• MULTIPLE - 1 dep & more than 1 indep variable
• PARTIAL - 1 dep & more than 1 indep variable bt only 1 indep variable is considered while other const
COEFFICIENT OF CORRELATION
Measure of the strength of linear relationship b/w two variables.Represented by 'r''r' lies b/w +1 & -1-1 ≤ r ≤ +1 +ive sign = +ive linear correlation -ive sign = -ive linear correlation
MATHEMATICALLY 'r'
2 2 2 2
( )( )
[ ( ) ][ ( ) ]
n xy x yr
n x x n y y
INTERPRETATION OF 'r'
INTERPRETATION-1 ≤ r ≤ +1
-1 10-0.25-0.75 0.750.25
strong strongintermediate intermediateweak weak
no relation
perfect correlation
perfect correlation
Directindirect
CORRELATIION: LINEAR RELATIONSHIPS
0
20
40
60
80
100
120
140
160
180
0 50 100 150 200 250
Drug A (dose in mg)
Sym
ptom
Inde
x
0
20
40
60
80
100
120
140
160
0 50 100 150 200 250
Drug B (dose in mg)
Sym
ptom
Inde
x
Srong Relationship → Good linear fitPoints clustered closely around a line show a
strong correlation. The line is a good predictor (good fit) with the data. The more spread out the points, the weaker the correlation, and the less good the fit. The line is a REGRESSSION line (Y = bX + a)
r : shows relationship b/w variables either +ive or -ive
r2 : shows % of variation by best fit line
Example:Example:
A sample of 6 children was selected, data about their age A sample of 6 children was selected, data about their age in years and weight in kilograms was recorded as shown in years and weight in kilograms was recorded as shown in the following table . It is required to find the in the following table . It is required to find the correlation between age and weight.correlation between age and weight.
serial # Age X I.V(years)
Weight Y D.V(Kg)
1 7 122 6 83 8 124 5 105 6 116 9 13
Serial n.
Age (years)
(x)
Weight (Kg)(y)
xy X2 Y2
1 7 12 84 49 1442 6 8 48 36 643 8 12 96 64 1444 5 10 50 25 1005 6 11 66 36 1216 9 13 117 81 169
Total ∑x=41
∑y=66
∑xy= 461
∑x2=291
∑y2=742
r = 0.759r = 0.759strong direct correlation strong direct correlation
2 2
41 664616r
(41) (66)291 . 7426 6
2 22 2
x yxy
nr( x) ( y)
x . yn n
APPLICATIONS
Estimating & improving.,Seasonal sales for departmental storesQuantity demanded & productionMotivating tools for employeesCost of products demandedaccuracy of estimations for demands for sailsInflation & real wageOil exploration
Moreover, Radar system is field where correlation is vehicle to map distance&in communication, for instance in digital receivers.
SPSS TUTORIAL
1.Analyz2.Correlate 3.(Bivariate)
Points to be noted:Confidence LevelCorrelation is highly significant 0.01**Correlation is significant 0.05*