Question

There are three basketball players, A, B, and C. A takes 30 shots a game, with...

There are three basketball players, A, B, and C. A takes 30 shots a game, with a shooting percentage of 70%. B takes 20 shots, hitting 60%, and C takes 10 shots, hitting 50%.

Write a program in java or python. Use the above statement to simulate players A, B, and C in a season of 82 games. Generate a string of shots for each player in each game, length 30, 20, and 10 shots. Count the number of shots each makes.

Accumulate and make histograms of the following statistics:

  • Total shots for all three players per game.
  • Total shots for player A per game.
  • Total shots for player B per game.
  • Total shots for player C per game.

Which of these histograms resemble a Normal distribution?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Here is the code in python

=======================================================================================

import random

A = []   # create an empty list for player A
B = []    # create an empty list for player A
C = []     # create an empty list for player A

for _ in range(30):
    # create a bias of 70% chance
    if random.random() <= 0.7:
        A.append(1)
    else:
        A.append(0)

for _ in range(20):
    # create a bias of 60% chance
    if random.random() <= 0.6:
        B.append(1)
    else:
        B.append(0)

for _ in range(10):
    # create a bias of 50% chance
    if random.random() <= 0.5:
        C.append(1)
    else:
        C.append(0)

A_shots=sum(A)
B_shots=sum(B)
C_shots=sum(C)

print('Histogram')
print('A stats {0}/{1} - {2}'.format(A_shots,len(A),'*'*A_shots))
print('B stats {0}/{1} - {2}'.format(B_shots,len(B),'*'*B_shots))
print('C stats {0:>2}/{1:>2} - {2}'.format(C_shots,len(C),'*'*C_shots))

=========================================================================================

Normal distribution will be for player C as the probability is 50%. The chance of shooting is 1 over 2 which is equal to 50%

Add a comment
Know the answer?
Add Answer to:
There are three basketball players, A, B, and C. A takes 30 shots a game, with...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A basketball player makes 30% of his three point attempts a. If six shots are made...

    A basketball player makes 30% of his three point attempts a. If six shots are made in a game what are the mean and standard deviation of the number made? b. What is the probability that at least 2 will be made?

  • Need C-E A basketball player attempts 22 shots from the field during a game. This player generally hits about 29% of the...

    Need C-E A basketball player attempts 22 shots from the field during a game. This player generally hits about 29% of these shots. (a) In order to use a binomial model for the number of made baskets, what assumptions are needed in this example? Are they reasonable? (b) How many baskets should you expect this player to make in the game? (c) If the player hits more than 11 shots (12, 13, 14, or 22), should you be surprised? (d)...

  • Donovan Mitchell is a basketball player who plays for the Utah Jazz. For the 2017-2018 year,...

    Donovan Mitchell is a basketball player who plays for the Utah Jazz. For the 2017-2018 year, Mitchell’s shooting percentage was 0.502. (This is 2 pointers only.) Thus, we can think of him as a machine that, on average makes, 50.2 % of his shots. (There is a lot of analysis to debunk things like “having a hot hand” or “being on a roll”.) On average, Mitchell takes 10 shots per game. a) Let X be the random variable that represents...

  • 1 22. (10 marks) In a game, three players A, B and C take turns to...

    1 22. (10 marks) In a game, three players A, B and C take turns to shoot at a target. Player A shoots first. If A misses the target, B shoots. If B misses the target, C shoots. If missed the target, A shoots; and so on. When a player hits the target, this player wins the game and the game is over. The probability that A hits the target is the probability that B hits the target is; and...

  • Problem 4. (20 points) Pebbles Game. Two players play a game, starting with three piles of...

    Problem 4. (20 points) Pebbles Game. Two players play a game, starting with three piles of n pebbles each. Players alternate turns. On each turn, a player may do one of the following: take one pebble from any pile take two pebbles each from two different piles The player who takes the last pebble(s) wins the game. Write an algorithm that, given n, determines whether the first player can "force" a win. That is, can the first player choose moves...

  • Steph Curry is an NBA basketball player for the Golden State Warriors. His 2016-2017 season was...

    Steph Curry is an NBA basketball player for the Golden State Warriors. His 2016-2017 season was not up to his previous standards, and analysts talked about it in the last month of the season. In his previous seasons, he made 1593 of 3590 three pointers attempts in 495 games, not couting playoffs. That season, he had attempted 633 threepointers with about a month to play - that number was after the 66th game (he only played in 64 of those)....

  • Two player Dice game In C++ The game of ancient game of horse, not the basketball...

    Two player Dice game In C++ The game of ancient game of horse, not the basketball version, is a two player game in which the first player to reach a score of 100 wins. Players take alternating turns. On each player’s turn he/she rolls a six-sided dice. After each roll: a. If the player rolls a 3-6 then he/she can either Roll again or Hold. If the player holds then the player gets all of the points summed up during...

  • 3. (30 pts) Consider the following game. Players can choose either left () or 'right' (r) The tab...

    3. (30 pts) Consider the following game. Players can choose either left () or 'right' (r) The table provided below gives the payoffs to player A and B given any set of choices, where player A's payoff is the firat number and player B's payoff is the second number Player B Player A 4,4 1,6 r 6,1 -3.-3 (a) Solve for the pure strategy Nash equilibria. (4 pta) (b) Suppose player A chooses l with probability p and player B...

  • Discrimination in the Market for Basketball Trading Cards? In the article, "Does Race Matter? Assessing Consumer...

    Discrimination in the Market for Basketball Trading Cards? In the article, "Does Race Matter? Assessing Consumer Discrimination in the Secondary Basketball Card Market" (The Social Science Journal 49 (2012), pp. 72- 82), the authors examine whether a player's race affects trading card values by using a sample of 215 retired players and the value of their rookie (first-year) trading cards in the secondary market for basketball cards in 2009. The authors employ ordinary least squares to estmate a multiple regression...

  • GAME MATRIX Consider two players (Rose as player 1 and Kalum as player 2) in which each player has 2 possible actions (...

    GAME MATRIX Consider two players (Rose as player 1 and Kalum as player 2) in which each player has 2 possible actions (Up or Down for Rose; Left or Right for Kalum. This can be represented by a 2x2 game with 8 different numbers (the payoffs). Write out three different games such that: (a) There are zero pure-strategy Nash equilibria. (b) There is exactly one pure-strategy equilibrium. (c) There are two pure-strategy Nash equilibria. Consider two players (Rose as player...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT