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
What information is contained in the title bar
Varvara68 [4.7K]

Answer:

like the url i think

Explanation:

8 0
3 years ago
status is a non-volatile memory chip used for store translation data between personal computer PC and digital device ​
Sladkaya [172]

Answer:

Non-volatile memory (NVM) is a type of computer memory that has the capability to hold saved data even if the power is turned off. Unlike volatile memory, NVM does not require its memory data to be periodically refreshed. It is commonly used for secondary storage or long-term consistent storage.

3 0
2 years ago
Why do we have to watch a video to get answers?
IRINA_888 [86]

Answer:

The videos contain the answers.

Explanation:

4 0
3 years ago
Read 2 more answers
A mobile phone is responding slowly and erratically for a user. The user has tried a soft reset on the device, but the phone con
lubasha [3.4K]

Answer:

At first try to Restart your device and use it which will close all the running apps and phone can process a bit faster . Other Chances for slow processing can be lack of internal storage so if restart doesn't work then try to do Do Option B.

4 0
3 years ago
A(n) _______ is a distributed networking architecture, residing on one or more computers, where one program requests a resource
vova2212 [387]

Answer: Client-Server model

Explanation:

The Client-server model is a distributed network application configuration, that partitions task or where one program requests a resource or service from another program, between the providers of a resource or service, called servers, and service requesters called clients. In the client-server architecture, when the client computer sends a request for data to the server through the internet, the server accepts the requested process and deliver the data packets requested back to the client.

4 0
3 years ago
Other questions:
  • Which of the following would an interactive media proffessional must likely need
    9·1 answer
  • âwhen the footer is the last element in a page body, the _____ pseudo-element is used to add a placeholder element after the foo
    8·2 answers
  • Briefly discuss constraints
    13·1 answer
  • Which tab allows you to modify the width of a page margins in Microsoft word?
    7·2 answers
  • You realize your computer has been infected with malware. The program has been copying itself repeatedly, using up resources. Wh
    10·1 answer
  • Explain the differences between apple and android
    14·2 answers
  • Which type of chart or graph uses vertical bars to compare data? a Column chart b Line graph c Pie chart d Scatter chart
    14·2 answers
  • How do we add questions on sam Blockly?​
    6·1 answer
  • Limited time only for christmas give yourself free 100 points YES YES yes yes yes
    6·2 answers
  • Which option is designed by software engineers?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!