1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kaheart [24]
3 years ago
9

Implement the simulation of a biased 6-sided die which takes the values 1,2,3,4,5,6 with probabilities 1/8,1/12,1/8,1/12,1/12,1/

2. In [ ]: # WRITE YOUR OWN CODE HERE! FEEL FREE TO INSERT MORE CELLS! # ADD SOME COMMENTS TO YOUR CODE! ​ Plot a histrogramm with 1,000,000 simulations to check if the relative counts of each number is approximately equal to the corresponding specified probabilities. Remark: Specify the bins of your histogram correctly.

Computers and Technology
1 answer:
hjlf3 years ago
4 0

Answer:

see explaination

Explanation:

import numpy as np

import matplotlib.pyplot as plt

a = [1, 2, 3, 4, 5, 6]

prob = [1.0/8.0, 1.0/12.0, 1.0/8.0, 1.0/12.0, 1.0/12.0, 1.0/2.0]

smls = 1000000

rolls = list(np.random.choice(a, smls, p=prob))

counts = [rolls.count(i) for i in a]

prob_exper = [float(counts[i])/1000000.0 for i in range(6)]

print("\nProbabilities from experiment : \n\n", prob_exper, end = "\n\n")

plt.hist(rolls)

plt.title("Histogram with counts")

plt.show()

check attachment output and histogram

You might be interested in
Intelligence is to creativity as _____ is to _____. Group of answer choices spatial intelligence; musical intelligence correct t
NARA [144]

Answer:

convergent thinking is to divergent thinking.

Explanation:

5 0
3 years ago
Name and define (or list the set that defines) three of the four common data types in programming
aliina [53]

In Computer programming, there are four (4) common data types and these include:

  1. Integer type (int):
  2. Floating point type (float)
  3. Boolean (bool)
  4. String (str)

<h3>The kinds of data type.</h3>

In Computer programming, there are four (4) common data types and these include:

  • <u>Integer type (int):</u> it is used for storing whole numbers such as 1, 2, 3, 4, ..... 2,147,483,647.

  • <u>Floating point type (float):</u> it is used for defining real numbers that have a decimal point such as 0.009, 9.87, 5.6, etc.

  • <u>Boolean (bool):</u> it allow users to combine keywords with Boolean operators (quotes, AND, OR, near/n) as either true or false.

  • <u>String (str):</u> it is used for data values that are made up of ordered sequences of characters.

Read more on a data types here: brainly.com/question/25619349

3 0
2 years ago
Binary search requires that the data to search be in order.<br> True or false
iren [92.7K]
<span>Hello Pennstatealum </span><span>


Question: Binary search requires that the data to search be in order.
True or false


Answer: True

Hope This Helps
-Chris</span>
6 0
3 years ago
Describe at least one issue of terrorism that has happened recently.
zvonat [6]

Answer:

The republicans storming the capitol

Explanation:

6 0
2 years ago
Which of the following is a strength of fiscal policy?
Fynjy0 [20]
The answer to your question is b crowding out effect
7 0
3 years ago
Other questions:
  • The counter variable in the code below increments by 1 each time through the loop. What will the value of counter be after the f
    11·1 answer
  • When numbers are changed in cells that are involved in formula is the formulas are automatically
    14·1 answer
  • You are a network security administrator for a bank and you have noticed that an attacker has exploited a flaw in OpenSSL and fo
    9·1 answer
  • What are the importance of switches in our electron device
    15·1 answer
  • CodeHS 3.4.5. What is the code for four colored triangles.
    8·1 answer
  • Your boss is very skeptical about the idea of storing his files up in the cloud rather than on a local storage drive. He asks yo
    7·1 answer
  • HELLLLLLLLPPPPPPPPPPPP HHHHHHHHHEEEEEEEEELLLLLLPPPPPP MEEEEEEEE
    12·2 answers
  • Different he launc.<br>in function are available with MS-Excel<br>Many​
    14·1 answer
  • Help plz (will give brainliest)
    9·1 answer
  • Write algorithm and flowchart for the following<br>a.find the sum and average of any four numbers ​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!