8-4 Quiz Python Functions - Results
docx
keyboard_arrow_up
School
Southern New Hampshire University *
*We aren’t endorsed by this school
Course
243
Subject
Industrial Engineering
Date
Jan 9, 2024
Type
docx
Pages
4
Uploaded by BaronKuduPerson693
8-4 Quiz: Python Functions - Results
Attempt 1 of 2
Written Oct 11, 2023 5:00 PM - Oct 11, 2023 5:09 PM
You have successfully submitted the Module Eight 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
What is the use of the chi-square goodness of fit test? Select one.
Question options:
To test the difference in three or more population means
To test how close the distribution of a population is to a Student’s t-distribution
To test how close the distribution of a population is to an expected distribution
To test how close the distribution of a population is to a Normal distribution
Question
2
3 / 3
points
Which of the following Python methods is used to perform chi-square goodness of fit
tests? Select one.
Question options:
tukeyhsd from scipy.stats submodule
f_oneway from scipy.stats submodule
anova_lm from scipy.stats submodule
chisquare from scipy.stats submodule
Question
3
3 / 3
points
A university conducted a survey of its recent graduates. The university wanted to
measure the quality of a new Engineering course. A survey was conducted during the
first offering of the course to evaluate its overall quality. The results of the survey are
shown below:
Needs Improvement: 55%
Meets Expectations: 30%
Excellent: 15%
The university made improvements to the course earlier this year. Then it conducted
another survey to evaluate how these improvements worked. A total of 500 students
were surveyed. Their results are shown below:
Needs Improvement: 175 students
Meets Expectations: 225 students
Excellent: 100 students
You want to perform a chi-square test for goodness of fit, to see if students’ views
have changed about the course. Which of the following Python scripts prints the P-
value and test statistic for the chi-square test? Select one.
Question options:
from scipy.stats import chisquare
statistic, pvalue = chisquare([175,225,100], f_exp=[275,150,75])
print(statistic)
print(pvalue)
from scipy.stats import chisquare
statistic, pvalue = chisquare([275,150,75], f_exp=[175,225,100])
print(statistic)
print(pvalue)
from scipy.stats import chisquare
statistic, pvalue = goodness_of_fit([275,150,75], f_exp=[175,225,100])
print(statistic)
print(pvalue)
from scipy.stats import chisquare
statistic, pvalue = goodness_of_fit([175,225,100], f_exp=[275,150,75])
print(statistic)
print(pvalue)
Question
4
3 / 3
points
A biologist is studying the composition of birds on a lake and counts 61 ducks, 17
geese, 11 cranes, 15 swans, and 6 herons. From previous studies performed around
the same time of the year, she expects 50% of the birds to be ducks, 23% to be geese,
12% to be cranes, 10% to be swans, and 5% to be herons. What are the expected and
observed counts? Select one.
Question options:
Expected = 61 ducks, 17 geese, 11 cranes, 15 swans, and 6 herons
Observed = 55 ducks, 25 geese, 13 cranes, 11 swans, and 6 herons
Expected = 55 ducks, 25 geese, 13 cranes, 11 swans, and 6 herons
Observed = 61 ducks, 17 geese, 11 cranes, 15 swans, and 6 herons
Expected = 61 ducks, 17 geese, 11 cranes, 15 swans, and 6 herons
Observed = 61 ducks, 17 geese, 11 cranes, 15 swans, and 6 herons
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
Expected = 55 ducks, 25 geese, 13 cranes, 11 swans, and 6 herons
Observed = 55 ducks, 25 geese, 13 cranes, 11 swans, and 6 herons
Question
5
3 / 3
points
A biologist is studying the composition of birds on a lake and counts 61 ducks, 17
geese, 11 cranes, 15 swans, and 6 herons. From previous studies performed around
the same time of the year, she expects 50% of the birds to be ducks, 23% to be geese,
12% to be cranes, 10% to be swans, and 5% to be herons. What are the correct null
and alternative hypotheses for performing a chi-square goodness of fit test? Select
one.
Question options:
Null Hypothesis
H
0
: The distribution of birds observed follows the distribution from previous studies.
Alternative Hypothesis
H
1
: The distribution of birds observed does not follow the distribution from previous studies.
Null Hypothesis
H
0
: The distribution of birds observed follows the Student’s t-distribution.
Alternative Hypothesis
H
1
: The distribution of birds observed does not follow the Student’s t-distribution.
Null Hypothesis
H
0
: The distribution of birds observed does not follow the distribution from previous studies.
Alternative Hypothesis
H
1
: The distribution of birds observed follows the distribution from previous studies.
Null Hypothesis
H
0
: The distribution of birds observed follows the Normal distribution.
Alternative Hypothesis
H
1
: The distribution of birds observed does not follow the Normal distribution.