Download Group 3 Project #3 P

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Inverse problem wikipedia , lookup

Vector generalized linear model wikipedia , lookup

Predictive analytics wikipedia , lookup

Expectation–maximization algorithm wikipedia , lookup

Corecursion wikipedia , lookup

Linear algebra wikipedia , lookup

Simplex algorithm wikipedia , lookup

Regression analysis wikipedia , lookup

Generalized linear model wikipedia , lookup

Transcript
Project #3 by Daiva Kuncaite
Problem 31 (p. 190)
Researchers wondered
whether the size of
person’s brain was related
to the individual’s mental
capacity. To find out the
answer first I will add
provided data in the book
to the spss system.
Data
Provided data in the book
table I added in the spss
sytem . I construct three
variables for gender, MRI
count and IQ score.
a) draw a scatter diagram,
treatning MRI count as
explanatory variable and IQ
as response.
STEP 1:
• I choose
Graphs > Scatter
to open the Scatter plot
dialog box.
• select Simple in order to
create simple scatter plot.
•Then I click Define.
STEP 3
•I paste the variable MRI
count in the X axis ,
because it is explanatory
variable and IQ score I
paste in the Y axis box
because it is a response
variable.
• Then I click OK.
Result:
•The output window will
show the scatter plot .
• From the scatter diagram
I can see that there is
positive linear relationship
between MRI and IQ
score.
b) Compute the linear
correlation coefficient
between MRI count and IQ
score. Is the MRI count
and IQ score are linearly
related?
Step 1:
•I use the program Analyze
> Correlate > Bivariate in
order to get the linear
correlation coefficient.
Step 2
•
•
I place MRI count and IQ
score in the variable window
Click OK
Step 3:
• The output window will show
correlation table.
• The Person Correlation between
the MRI count and IQ score is
0.548, which indicates that there
is a positive weak linear
relationship between those two
variables . Larger the MRI count,
larger the IQ score.
C) Draw a scatter diagram by using
different plotting symbol for each gender.
Step 1:
• I use the program Graph >
Scatter... It shows me a scatter
plot box where I chose function
Simple and click Define.
• It opens simple scatter plot box. I
place MRI count in X – axis box
(explanatory variable), IQ score in
Y-axis box ( response variable)
and gender in Set Markers by box
in order to create different
symbols for each gender.
• Click OK
Step 2:
• The output window show the
scatter plot in which male
represents green color and
female represents red color.
• From the diagram we can see
clearly that females tend to have
lower MRI counts. After the
separation we can see that weak
linear relationship seems to
disappear. Neither of group
presents any clear relationship
between IQ and MRI count
d) Compute the linear correlation
coefficient for females and males
separately. Do you believe that MRI
count and IQ score are linearly related?
Step1:
• First, I select the cases for female
only from the data by using Data >
Select Cases
• It opens select cases window
where I’m going to choose the
command If condition is satisfied
• I click OK.
Step 2:
• Select cases: if window opens and
in the variable bow I put
gender=‘F’ in order to get
selected all females from the data
set.
• Click continue.
Step 3:
• Computer automatically selected
all female participants in the
date.
• Now I can find out the linear
correlation coefficient between
MRI count and IQ score for
females only by using Analyze >
Correlate > Bivariate
Step 4:
• In the Bivariate correlation
window I put MRI count and IQ
score in the variable box.
• Click OK.
Step 5:
• The output window will show
that the linear correlation
coefficient for females ( r) is
0.359
Step 6:
• I repeat the steps from 1 to 2, just
in the select case if: window I put
gender=‘M’ in order to select all
Male participants in the data set.
• Click Continue.
Step 7:
• The computer automatically
selected Male only and now I can
compute the linear correlation
coefficient between MRI count
and IQ score for males only by
using Analyze > Correlate>
Bivariate
• Click OK
Step 8:
• The output window will show the
linear correlation coefficient ( r)
for males only which is 0.236
Step 9:
• In conclusion it appears that
there is no linear relationship
between brain size (MRI count)
and IQ score.
• The moral of the story is to be
aware of the lurking variables.
Problem 23 (p.207)
• I use same data set for the
problem 23.
a) Find the least- squared regression
line.
Step 1:
• In order to find the least –
squared regression line I use the
program Analyze > Regression>
Linear
Step 2:
• It opens linear regression window
where I place MRI count in the
Independent variable box and IQ
score in the Dependent variable
box.
• Click OK
Step 3:
• The output window will show 4
tables. I use the last table to
determine the least - squares
regression line.
• The Coefficient table shows that
the values of Y – intercept
(109.894) and slope
(0.00002863).
• The regression equation is: Y (hat)
= 0.00002863 +109.8940
b) What do you notice about the value of the slope? Why does this result
seems reasonable based on the scatter diagram and linear correlation
coefficient obtained in Problem 31 (p. 190)
• The slope is closed to 0, which is due to the weak linear relationship that is
presented. Also the size of the values for MRI count is very large (hundreds
of thousands).
• This result seems reasonable in comparison with the scatter diagram and
linear correlation coefficient obtained in the problem 31 (p.190)
c) When there is no relation between the explanatory and response variable we use
the mean value of the response variable, y (bar), to predict. Predict the IQ of an
individual whose MRI count is 1,000,000. Predict the IQ of an individual whose MRI
count is 830,000
•
•
•
There is no apparent relation
between MRI and IQ.
In both cases we use y( bar) as our
estimate.
I find the mean of IQ score by using
program Analyze > Descriptive
Statistic> Frequency
Step 2:
• In the Frequency variable window
I add MRI count and IQ score.
• I click on Statistics bar.
• It opens statistics window in
which I mark mean in order to get
the mean of the IQ score.
• Click Continue in the Statistics
window and then OK in the
Frequency window.
Step 3:
• The mean for IQ score is equal to
136.40
• Since in both cases we use y bar
as our estimate, then y hat = y
bar = 136.40
Consumer reports: Fit to drink
• Concern about water quality and
taste have made home filtering
increasingly popular.
• To test chloroform and lead
removal was added concentrated
amounts of both to the water.
• Every few days the water was
analyzed and measured
chloroform and lead content.
• I added the data in the spss
system which contains only lead
measurments.
a) Construct a scatter diagram of the
data by using % Lead
Removed as the response
variable.
• I use the program Graph> Scatter
• It opens scatter plot window
where I chose Simple in order to
construct a simple scatter
diagram.
• Click Define.
• It opens Simple Scatter Plot
window where I put % Lead
Removed to the Y axis as
response variable and Gallons
Processed to the X axis as
explanatory variable.
• Click OK
b) Does the relationship between
NO. Gallons Processed and % Lead
Removed appear to be linear?
• The output window shows the
scatter diagram.
• The relationship between No.
Gallons Processed and % Lead
removed appear to be positive
linear.
c) Calculate the linear correlation
coefficient . Based on the scatter diagram
in part a) and the answer in part b), is this
measure useful? What is R squared?
Interpret R squared.
Step 1:
• I calculate the linear correlation
coefficient by using program
Analyze > Correlate > Bivariate
• It opens Bivariate window.
• I place No. Gallons Processed and
% Lead Removed to the variable
window.
• Click OK.
Step 2:
• The output will show the
correlation table.
• The linear correlation coefficient r
= 0.868, which means that there
is a positive linear relationship
between two variables.
Step 3:
• I compute the least –squares
regression line by using program
Analyze> Regression > Linear
• I t opens linear regression
window in which I place % Lead
removed in Dependent variable
box and No. Gallons Processes in
the Independent variable box .
• Click OK.
Step 4:
• The output window will show 4
tables.
• In the Model Summary table we
find R squared.
• R squared = 0.753
• It means that 75.3 % of the
variation in the values % Lead
Removed explained by the linear
relation between two variables.
d) Fit the linear regression model to
these data.
Step 1:
• In the output window I double
click the scatter diagram.
• The computer will give me SPSS
Chart Editor Window.
• I use program Chart > Options>
which gives me scatter plot
options window.
• I mark box Total .
• I click on the bar Fit Options..
Step 2:
• After clicking Fit Options new
window opens in which I mark
Linear Regression Icon.
• Click Continue.
• Click OK.
Step 3:
• The scatter diagram
with a linear regression
model