Convert these frequencies into probabilities by dividing by

Assignment Help Science
Reference no: EM13465575

Part A: In the first part of this assignment, you will be simulating the rolling of a balanced six-faced die. You will roll the die 900 times and examine the first 30, 150, 300 and 600 rolls, as well as all 900 rolls. For each of these numbers of rolls you will compute the observed probabilities of obtaining each of the six outcomes, and compare these probabilities with the real probabilities of obtaining these outcomes.

Assignment 1a

Your MATLAB file should be named Assignment1a.m. This program should do the following:

1. Using the random number function, randi, generate a 10 ´ 900 array of random integers between 1 and 6 in the array X. The 10 rows represent ten different experiments and the 900 columns represent 900 trials (i.e., rolls).

2. Using the randi function, randomly select a row from X.

3. Count the number of times each of these outcomes occurs. You need to obtain the number of times each of these outcomes occurs in the first 30 trials (i.e., the first 30 values of X), as well as the first 150, 300, 600, and in all 900 values of this row.

4. Next, you need to convert these frequencies into probabilities by dividing by the corresponding number of trials. You also need to have available the real probabilities associated with each of the six outcomes.

5. Generate a plot of probability (y-axis) versus outcome (x-axis). There should be 6 lines plotted: one each for the 30, 150, 300, 600, and 900 trial situations and one line that represents the real probability values for each of these six outcomes. The line associated with the real probabilities for each of the six outcomes should be a solid line. Make sure the two axes are labeled and the plot is titled. Also, ensure that the x-axis only contains the six outcome values, and that there is a legend. Many of these formatting adjustments can be made after the plot is generated while working with the menu options available with the figure plot.

6. Run your program three times. Each run should result in a different plot, so you should have three plots.

Answer the following questions:

(a) In general, how different are the three plots from one another (give an example to illustrate your point)?

(b) Why should there be variability across these plots?

(c) Which trial number (30, 150, 300, 600, or 900) appears to be the most variable across the three plots and which appears to be the least variable, and what is the basis for your assessment?

(d) Overall, at which number of trials do the observed probabilities appear to begin to converge to the real probability values?

Part B: In this second part of the assignment, you will be simulating rolling two balanced six-faced dice. You will roll the two dice 900 times and examine the first 30, 150, 300 and 600 rolls, as well as all 900 rolls. For each of these numbers of rolls, you will compute the observed probabilities of obtaining outcomes of two, seven, and eleven, and compare these probabilities with the real probabilities of getting each of these outcomes.

Assignment 1b

Your MATLAB file should be named Assignment1b.m. This program will be similar to Assignment 1a.m, with the primary exceptions being that it will involve simulating rolling two dice and examining three (2, 7, and 11) instead of six outcomes. This program should do the following:

1. Using the random number function, randi, generate a 10 ´ 900 array of random integers between 1 and 6 in the array X. The 10 rows represent ten different experiments and the 900 columns represent 900 trials (i.e., rolls).

2. Using the randi function, randomly select two rows from X.

3. Ensure that that the two rows randomly selected differ.

4. Define the array Y as the sum of these two rows.

5. Count the number of times a two, seven, or eleven occurs in the first 30 trials (the first 30 values of Y), as well as the first 150, 300, 600, and in all 900 values of Y.

6. Convert these frequencies into probabilities by dividing by the corresponding number of trials. You also need to have available the real probabilities associated with each of these three outcomes (2, 7, and 11).

7. Generate a plot of probability (y-axis) versus outcome (x-axis). There should be 6 lines plotted: one each for the 30, 150, 300, 600, and 900 trial situations and one line that represents the real probability values for each of these three outcomes. The line associated with the real probabilities for each of the three outcomes should be solid Make sure the axes are labeled, the plot is titled, the x-axis only contains the three outcome values, and that there is a legend.

7. As in Assignment 1a, run your program three times to generate three plots.

Answer the following questions:

(a) Does there appear to be a relationship between the real probability value and the variability in the estimates? Explain.

(b) Overall, at which number of trials do the observed probabilities appear to converge with the real probabilities?

(c) Consider the procedure that was used in this simulation study (for both Parts A and B). For any given simulation run that generated a plot, would you consider the five different curves associated with the different trial numbers (30, 150, 300, 600, and 900) on any given plot to be independent of one another? Why or why not?

(d) How could the procedure of the simulation have been improved?

Reference no: EM13465575

Questions Cloud

How important is fairness with respect to work motivation : answer both questions1 why is the hierarchical structure limited in its capacity to facilitate coordination among
How could a point-of-sale system be used to simplify : 1.how could a point-of-sale system be used to simplify employee training of kitchen staff? what about the accounting
After completing the emotional intelligence test do you : instructionsassessing and improving employee motivation are essential for effective leadership. these skills can
What is the difference between a proprietary system and an : what is the difference between a proprietary system and an open platform?what proprietary systems are used in your
Convert these frequencies into probabilities by dividing by : part a in the first part of this assignment you will be simulating the rolling of a balanced six-faced die. you will
The purpose of hospitality it system is to convert data : the purpose of hospitality it system is to convert data into information. how does an organizations choice in hardware
What are the pros and cons of social networks in business : what are the pros and cons of social networks in business? how can companies use social networks to improve
Write a comprehensive medical report on a disease we have : write a comprehensive medical report on a disease we have studied up to this point. be sure to include all relevant
What new internet technologies and collaboration tools : what new internet technologies and collaboration tools are available today? which of these resources are essentially

Reviews

Write a Review

Science Questions & Answers

  Write down a 350- to 700-word summary in apa format

write a 350- to 700-word summary in apa format describing the path food follows through the digestive system.answer the

  Find the density of dry air at the same temp and pressure

Consider the following situation: The temp is 15 degrees celsius, the pressure is 1010mb, and the concentration of water vapor in the air is 15 g of H2O vapor per kilogram of air. a) Find the density? b) Find the density of dry air at the same temp a..

  Selectnbspa religion that is not your own and interview a

selectnbspa religion that is not your own and interview a person of that faith. if possible visit a place of worship

  Describe the relevance of this statement to a main change

explain to the class what you mean by being half american. if one is a citizen of the united states how can he or she

  What is the main point of process analysis in writing why

read the cause and effect essay titled struggling for perfection on pp. 829-832. what supporting elements did amy

  What can the united states health care system learn from

what can the united states health care system learn from health care systems such as universal health uhc or

  Associate two stimuli with getting taken for a walk

Benson, a black lab, had learned to associate two stimuli with getting taken for a walk, his owner getting out his leash, and his owner getting out a belt.

  Durham health clinic has a contribution margin of 35 per

durham health clinic has a contribution margin of 35 per visit. calculate the break-even point in visits with fixed

  In 2 pages apa style explain the importance of assessing a

in 2 pages apa style explain the importance of assessing a communitys education and politicsgovernment. explain the

  Manipulate the system to test your hypothesis

Suppose you spot two species of birds feeding side by side, eating seeds from the plant. You begin to wonder whether competition is at work. Describe how you might design scientific research to address this question.

  Origins and spread of buddhism

can you write about 3 to 4 paragraphs about the origins and spread of Buddhism?

  Compare and contrast the mendelian and non-mendelian

compare and contrast the mendelian and non-mendelian patterns of inheritance. describe what you believe is the most

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd