Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 1 (6 points) Which of the following Python functions is used to perform

ID: 3374750 • Letter: Q

Question

Question 1 (6 points)

Which of the following Python functions is used to perform ANOVA to test for a difference in three or more population means?

Question 1 options:

anova_lm(data1, data2, data3, data4)

tukeyhsd(data1, data2, data3, data4)

f_oneway(data1, data2, data3, data4)

anova(data1, data2, data3, data4)

Save

Question 2 (6 points)

Which of the following Python function is used to print the ANOVA table?

Question 2 options:

tukeyhsd

anova_lm

anova

f_oneway

Save

Question 3 (6 points)

Which of the following Python functions is used to perform the Tukey's HSD test?

Question 3 options:

anova_lm

tukeyhsd

anova

f_oneway

Save

Question 4 (6 points)

Sample data is collected in ExamScores.csv that includes scores in four exams in a class. The variables are called Exam1, Exam2, Exam3, and Exam4. The professor is interested in finding out whether the average scores in at least one of the four exams is different at 5% level of significance using ANOVA. Which of the following Python lines can be used to perform this test?

Question 4 options:

import scipy.stats as st
scores = pd.read_csv('ExamScores.csv')
exam1_score = scores[['Exam1']]
exam2_score = scores[['Exam2']]
exam3_score = scores[['Exam3']]
exam4_score = scores[['Exam4']]
print(st.f_oneway(exam1_score, exam2_score, exam3_score, exam4_score))

import scipy.stats as st
import pandas as pd
scores = pd.read_csv('ExamScores.csv')
exam1_score = scores[['Exam1']]
exam2_score = scores[['Exam2']]
exam3_score = scores[['Exam3']]
exam4_score = scores[['Exam4']]
print(st.f_oneway(exam1_score, exam2_score, exam3_score, exam4_score))

import scipy.stats as st
import pandas as pd
scores = pd.read_csv('ExamScores.csv')
exam1_score = scores[['Exam1']]
exam2_score = scores[['Exam2']]
exam3_score = scores[['Exam3']]
exam4_score = scores[['Exam4']]
print(st.anova(exam1_score, exam2_score, exam3_score, exam4_score))

import scipy.stats as st
import pandas as pd
scores = pd.read_csv('ExamScores.csv')
print(st.f_oneway(scores))

Save

Question 5 (6 points)

Sample data is collected in ExamScores.csv that includes scores in four exams in a class. The variables are called Exam1, Exam2, Exam3, and Exam4. After ANOVA is performed on exam data, the professor is interested in plotting boxplots to identify the exam that has a significantly different average exam score. Which of the following Python lines can be used to complete this task?

Question 5 options:

import pandas as pd
import matplotlib.pyplot as plt
scores = pd.read_csv('ExamScores.csv')
fig = plt.figure()
fig.savefig('test.png')

import pandas as pd
import matplotlib
matplotlib.use('agg')
import matplotlib as mpl
import matplotlib.pyplot as plt
scores = pd.read_csv('ExamScores.csv')
exam1_score = scores[['Exam1']]
exam2_score = scores[['Exam2']]
exam3_score = scores[['Exam3']]
exam4_score = scores[['Exam4']]
data = [exam1_score, exam2_score, exam3_score, exam4_score]
fig = plt.figure()
ax = fig.add_subplot(111)
ax.boxplot(data)
fig.savefig('test.png')

import pandas as pd
import matplotlib
matplotlib.use('agg')
import matplotlib as mpl
import matplotlib.pyplot as plt
scores = pd.read_csv('ExamScores.csv')
fig = plt.figure()
ax = fig.add_subplot(111)
ax.boxplot(scores)
fig.savefig('test.png')

import pandas as pd
scores = pd.read_csv('ExamScores.csv')
exam1_score = scores[['Exam1']]
exam2_score = scores[['Exam2']]
exam3_score = scores[['Exam3']]
exam4_score = scores[['Exam4']]
data = [exam1_score, exam2_score, exam3_score, exam4_score]
fig = plt.figure()
ax = fig.add_subplot(111)
ax.boxplot(data)
fig.savefig('test.png')

Save

anova_lm(data1, data2, data3, data4)

tukeyhsd(data1, data2, data3, data4)

f_oneway(data1, data2, data3, data4)

anova(data1, data2, data3, data4)

Explanation / Answer

Solution

1) option (c) f_oneway(data1, data2, data3, data4)

2) option (d) f_oneway

3) tukeyhsd

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote