Question: Finding the Bootstrap Prediction Interval predictions about a bird's weight based on the weight of the corresponding egg. However, just as we're uncertain about the
Finding the Bootstrap Prediction Interval
predictions about a bird's weight based on the weight of the corresponding egg.
However, just as we're uncertain about the slope of the true regression line, we're also uncertain about the predictions made based on the true regression line.
Question Define the function fittedvalue It should take in four arguments:
table: a table like birds. We'll be predicting the values in the second column using the first.
col : the name of our column within the input table
col : the name of our column within the input table
givenx : a number, the value of the predictor variable for which we'd like to make a prediction.
The function should return the line's prediction for the given
Hint: Make sure to use the fitline function you defined in Question
Fit line function:
def fitlinetbl xcol, ycol
x tblxcol
y tblycol
slope,intercept nppolyfitxy
return slope intercept
fitline birds "Egg Weight" "Bird Weight"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
