bivariate analysis linear regression chi test
TRANSCRIPT
7/27/2019 Bivariate Analysis Linear Regression Chi Test
http://slidepdf.com/reader/full/bivariate-analysis-linear-regression-chi-test 1/13
Bivariate Analysis
(a)Correlation using Linear Regression
(Fitting a straight line between two Scalar Variables)
Use dataset modified_class_example
7/27/2019 Bivariate Analysis Linear Regression Chi Test
http://slidepdf.com/reader/full/bivariate-analysis-linear-regression-chi-test 2/13
Is there a relationship between salaries and
Student Age?
7/27/2019 Bivariate Analysis Linear Regression Chi Test
http://slidepdf.com/reader/full/bivariate-analysis-linear-regression-chi-test 3/13
Go to ChartBuilder->Scatter/Dot
Select Student Age onto horizontal axis and Salary on vertical one
7/27/2019 Bivariate Analysis Linear Regression Chi Test
http://slidepdf.com/reader/full/bivariate-analysis-linear-regression-chi-test 4/13
Is there a relationship between Student Age and Expected Marks?
7/27/2019 Bivariate Analysis Linear Regression Chi Test
http://slidepdf.com/reader/full/bivariate-analysis-linear-regression-chi-test 5/13
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
7/27/2019 Bivariate Analysis Linear Regression Chi Test
http://slidepdf.com/reader/full/bivariate-analysis-linear-regression-chi-test 6/13
Analyse -> Regression -> Linear
Model Summaryb
Model
R R Square
Adjusted R
Square
Std. Error of the
Estimate
i
m
n
i
n
1 .964a .930 .928 2120.38027
a. Predictors: (Constant), Student Age
b. Dependent Variable: Monthly Salary
7/27/2019 Bivariate Analysis Linear Regression Chi Test
http://slidepdf.com/reader/full/bivariate-analysis-linear-regression-chi-test 7/13
R = Pearson Coefficient (-1, 1)
-1 = Negative perfect
1= Positive Perfect
Coefficientsa
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
7/27/2019 Bivariate Analysis Linear Regression Chi Test
http://slidepdf.com/reader/full/bivariate-analysis-linear-regression-chi-test 8/13
7/27/2019 Bivariate Analysis Linear Regression Chi Test
http://slidepdf.com/reader/full/bivariate-analysis-linear-regression-chi-test 9/13
Correlation between Categorical or Nominal variables
(Chi-Square Test)
Is there an Association/Relationship between Gender andMotivation?
Are males and females motivated to the same degree?
Use of Contingency tables
7/27/2019 Bivariate Analysis Linear Regression Chi Test
http://slidepdf.com/reader/full/bivariate-analysis-linear-regression-chi-test 10/13
Analyse -> Descriptive -> Crosstabs
(Switch Display Clustered Bar on)
Statistics button
7/27/2019 Bivariate Analysis Linear Regression Chi Test
http://slidepdf.com/reader/full/bivariate-analysis-linear-regression-chi-test 11/13
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%
7/27/2019 Bivariate Analysis Linear Regression Chi Test
http://slidepdf.com/reader/full/bivariate-analysis-linear-regression-chi-test 12/13
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
Expected Count 7.5 2.9 7.5 18
% 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
Expected Count 5.5 2.1 5.5 13
% 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
Expected Count 13.0 5.0 13.0 31
% 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.287a 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……….
7/27/2019 Bivariate Analysis Linear Regression Chi Test
http://slidepdf.com/reader/full/bivariate-analysis-linear-regression-chi-test 13/13
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)