Please help me with the following python pandas practice! Will rate good answers! Introduction and preparation: **Questi

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Please help me with the following python pandas practice! Will rate good answers! Introduction and preparation: **Questi

Post by answerhappygod »

Please help me with the following python pandas practice! Will
rate good answers!
Introduction and preparation:
Please Help Me With The Following Python Pandas Practice Will Rate Good Answers Introduction And Preparation Questi 1
Please Help Me With The Following Python Pandas Practice Will Rate Good Answers Introduction And Preparation Questi 1 (64.47 KiB) Viewed 29 times
**Question 1.** Using your model in which you
have a 4% chance of being Impostor as your null hypothesis, write a
simulation that runs 100 games and keeps track of the **absolute
difference** between:
- the number of games in which you are an Impostor, and
- the number of times you'd expect to be an Impostor in 100
games according to your model (4).
Run your simulation 5000 times. Keep track of the differences in
an *array* called `among_us_differences`.
code:
# With all your simulations, try a small number of
repetitions first, then increase it.
n_repetitions = ...
...
# Visualize with a histogram
pd.DataFrame().assign(Difference =
among_us_differences).plot(kind='hist', bins=np.arange(10),
density=True, ec='w');
**Question 2.**
Your null hypothesis was that you have a 4% chance of being an
Impostor, but you got Impostor 8 times out of 100. Compute the
proportion of times in our simulation that we saw an outcome at
least as extreme as what we observed in real life. Assign your
result to `among_us_p_value`
code: among_us_p_value = ...
**Question 3.**
Based on the histogram and the p-value, set the variable
`among_us_null_hypothesis` below to `True` if you think your model
is plausible or `False` if it should be rejected at the standard
0.05 significance level.
code: among_us_null_hypothesis =
...
**Question 3.4.** In this question, we chose as our test
statistic the absolute difference between the number of times you
were an Impostor and the number of times you expected to be an
Impostor. But this is not the only statistic we could have chosen;
there are many that could have worked here. From the options below,
choose the test statistic that would **not** have worked for this
hypothesis test, and save your choice in the variable
`among_us_bad_choice`.
1. The number of times you were an Impostor.
2. The proportion of times you were an Impostor.
3. The absolute difference between the proportion of times you
were an Impostor and the proportion of times you expected to be an
Impostor.
4. The sum of the number of times you were an Impostor and the
number of times you expected to be an Impostor.
code: among_us_p_value = ...
Among Us is an online game that exploded in popularity last year during the COVID-19 quarantine. It is best described as a social deduction game. The goal is to identify an Impostor among a group of Crewmates. If you want to learn more about the game (or play - it's free!), check out their wiki or watch gameplay on YouTube. We will provide all information necessary to answer the questions in this section. In a game of Among Us, you choose a color to assign to your character and then you are randomly assigned to either be a Crewmate or an Impostor. Being the analytical person you are, you notice that there are some colors that are chosen to be an Impostor more often than others. You decide to explore this. Your model is: Player Estimated Chance of Impostor Red 13% Orange 10% Yellow 5% Green 11% Lime 5% Blue 9% Cyan 10% Purple 8% Pink 4% Black 10% White 2% Brown 13% Let's store these values in an array called among_us_distribution, representing our assumptions about the distribution of Imposters across different colors. among_us_distribution = np.array([0.13, 0.10, 0.05, 0.11, 0.05, 0.09, 0.10, 0.08, 0.04, 0.10, 0.02, 0.13]) among_us_distribution ✓ 0.55 array([0.13, 0.1, 0.05, 0.11, 0.05, 0.09, 0.1, 0.08, 0.04, 0.1, 0.02, 0.13]) Python The color that you select for your character is Pink, so you estimate that you have a 4% chance of being an Impostor in any given game. During a long and boring quarantine, you play 100 games, and you are selected to be an Impostor 8 times. You start to suspect that 4% might be too low of an estimate, and that your model is wrong.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply