Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please use python to solve this problem, thx for your help!! Ingredients: 1. sample space: 2. random variable X : R 3. probability function assuming
please use python to solve this problem, thx for your help!!
Ingredients: 1. sample space: 2. random variable X : R 3. probability function assuming fair die set up functions 1. A sample space of rolling a 6-sided die labelled 1,2,3,4,5,6 2. A random variable X on the sample space 3. A probability mass function pmf f), assuming the die is fair 4. A function that calculate probability of any given string to appear. round the result to 5 decimal place. Like in the coin case, probability that HTH shows up. Your code should be able to do the following: note that: You don't have to use the comments I wrote below, but you should write your own comments so that our grader can follow your ideas For each roll in rolls ['1',133345','123456',12,171 Note: roll '12' means you roll a die 2 times, .1' shows up first, then .2' shows up. You want to calculate the probability this occurs Calculate the probability of the roll shows up, round the probability to 5 decimal place Print your result as following form: roll = 1, probability = 0.16667 Ingredients: 1. sample space: 2. random variable X : R 3. probability function assuming fair die set up functions 1. A sample space of rolling a 6-sided die labelled 1,2,3,4,5,6 2. A random variable X on the sample space 3. A probability mass function pmf f), assuming the die is fair 4. A function that calculate probability of any given string to appear. round the result to 5 decimal place. Like in the coin case, probability that HTH shows up. Your code should be able to do the following: note that: You don't have to use the comments I wrote below, but you should write your own comments so that our grader can follow your ideas For each roll in rolls ['1',133345','123456',12,171 Note: roll '12' means you roll a die 2 times, .1' shows up first, then .2' shows up. You want to calculate the probability this occurs Calculate the probability of the roll shows up, round the probability to 5 decimal place Print your result as following form: roll = 1, probability = 0.16667Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started