5-4 Quiz Python Functions
pdf
keyboard_arrow_up
School
Southern New Hampshire University *
*We aren’t endorsed by this school
Course
243
Subject
Mathematics
Date
Feb 20, 2024
Type
Pages
3
Uploaded by MajorFreedom96566
5-4 Quiz: Python Functions Your work has been saved and submitted Written Feb 4, 2024 8:42 AM - Feb 4, 2024 8:47 AMAttempt 1 of 2 You have successfully submitted the Module Five quiz. Please review the learning resources or reach out to your instructor with any questions. Attempt Score 15 / 15 - A Overall Grade (Highest Attempt) 15 / 15 - A Question 1
3 / 3 points The ols() method in statsmodels was used to fit a simple linear regression model using “Exam4” as the response variable and “Exam1” as the predictor variable. The output is shown below.
A text version is available
. What is the correct regression equation based on this output? Is this model statistically significant at 5% level of significance (alpha = 0.05)? Select one. (Hint: Review results of F-statistic) Question options: , model is statistically significant , model is not statistically significant , model is not statistically significant
, model is statistically significant Question 2
3 / 3 points Which of the following Python methods return the correlation coefficient? Select all that apply. Question options: pearsonr method from scipy.stats submodule corr method from pandas dataframe Question 3
3 / 3 points The ols() method in statsmodels is used to fit a simple linear regression model using “Exam4” as the response variable and “Exam3” as the predictor variable. The output is shown below.
A text version is available
. What is the correct regression equation based on this output? Is this model statistically significant at 10% level of significance (alpha = 0.10)? Select one. (Hint: Review results of F-statistic) Question options: Exam4 = 76.85 + 0.206 Exam3, model is not statistically significant Exam4 = 68.9576 + 0.1028 Exam3, model is not statistically significant Exam4 = 76.85 + 0.206 Exam3, model is statistically significant Exam4 = 68.9576 + 0.1028 Exam3, model is statistically significant Question 4
3 / 3 points The height and grade point average of 50 randomly selected students are recorded. The following Python code is used to fit a simple linear regression model using data collected from the sample
that is stored in the gpa.csv file. Which of the two variables, “gpa” or “height”, is the response variable? Which is the predictor variable? Select one. import pandas as pd import statsmodels.formula.api as smf scores = pd.read_csv('
http://data-analytics.zybooks.com/gpa.csv
') model = smf.ols(gpa ~ height', scores).fit() Question options: gpa and height are both response variables. height is the response variable and gpa is the predictor variable. gpa and height are both predictor variables. gpa is the response variable and height is the predictor variable. Question 5
3 / 3 points Which of the following Python methods in scipy.stats submodule returns the P-value for performing a hypothesis test for the significance of the correlation coefficient? Select one. Question options: pearson from scipy module pearsonr from scipy module pearson from pandas module pearsonr from pandas module
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help