Você está na página 1de 13

Bivariate Analysis

(a)Correlation using Linear Regression


(Fitting a straight line between two Scalar Variables)

Use dataset modified_class_example



Is there a relationship between salaries and
Student Age?




Go to ChartBuilder->Scatter/Dot
Select Student Age onto horizontal axis and Salary on vertical one





Is there a relationship between Student Age and Expected Marks?





Can we forecast a relationship between Student age and Salaries?
YES. Use linear regression. That is fit a straight line between Student
Age and Salaries.
Example:
Y = ax + b











X is the Independent Variable
Y is the Dependent Variable


b
Gradient a
X
Y
Y = aX + b
Analyse -> Regression -> Linear




Model Summary
b

Model
R R Square
Adjusted R
Square
Std. Error of the
Estimate
d
i
m
e
n
s
i
o
n
0
1 .964
a
.930 .928 2120.38027
a. Predictors: (Constant), Student Age
b. Dependent Variable: Monthly Salary

R = Pearson Coefficient (-1, 1)
-1 = Negative perfect
1= Positive Perfect



Coefficients
a

Model
Unstandardized Coefficients
Standardized
Coefficients
t Sig. B Std. Error Beta
1 (Constant) -424.000 1625.122

-.261 .796
Student Age 996.417 50.752 .964 19.633 .000
a. Dependent Variable: Monthly Salary

b = -424.0
a = 996.417
Sig. less than 0.05 for a, shows good correlation and not by chance
Y = aX + b
Salary = 996.417 x Student Age 424.0











Correlation between Categorical or Nominal variables
(Chi-Square Test)
Is there an Association/Relationship between Gender and
Motivation?
Are males and females motivated to the same degree?
Use of Contingency tables



Analyse -> Descriptive -> Crosstabs

(Switch Display Clustered Bar on)
Statistics button


Cell button



Case Processing Summary

Cases
Valid Missing Total
N Percent N Percent N Percent
Student Gender * How
motivated is student?
31 100.0% 0 .0% 31 100.0%












Student Gender * How motivated is student? Crosstabulation

How motivated is student?
Total
Somewhat
Motivated Well Motivated Very Motivated
Student Gender male Count 12 1 5 18
Expected Count 7.5 2.9 7.5 18.0
% within Student Gender 66.7% 5.6% 27.8% 100.0%
% within How motivated is
student?
92.3% 20.0% 38.5% 58.1%
% of Total 38.7% 3.2% 16.1% 58.1%
Female Count 1 4 8 13
Expected Count 5.5 2.1 5.5 13.0
% within Student Gender 7.7% 30.8% 61.5% 100.0%
% within How motivated is
student?
7.7% 80.0% 61.5% 41.9%
% of Total 3.2% 12.9% 25.8% 41.9%
Total Count 13 5 13 31
Expected Count 13.0 5.0 13.0 31.0
% within Student Gender 41.9% 16.1% 41.9% 100.0%
% within How motivated is
student?
100.0% 100.0% 100.0% 100.0%
% of Total 41.9% 16.1% 41.9% 100.0%

Expected frequencies E(i,j) = R(i) C(j)/ N
Chi-Square Tests

Value df
Asymp. Sig. (2-
sided)
Pearson Chi-Square 11.287
a
2 .004
Likelihood Ratio 12.787 2 .002
Linear-by-Linear Association 7.490 1 .006
N of Valid Cases 31

a. 2 cells (33.3%) have expected count less than 5. The minimum
expected count is 2.10.will comment on this later.

Sig. is less than 0.05 (5%) This means that the probability of the values (Count) in the above
table occurring by chance is less than 5%. Therefore there is a significant association/
relationship between gender and Motivation.They are not independent.Some times this test is
also called the chi test for independence.
See diagram (Females are more motivated)

Você também pode gostar