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

  Journal of pharmaceutical sciences

This journal is a scientific publication of Indian Pharmaceutical Association and highlights various bright points of it.

  Optical fibres

This document discuss about the main attributes and characteristics of optical fibres.

  Micro organisms

This project report reveals the fact and proves a specific objective mentioned to be studied upon.

  Describing histology of an organ

The discussion of the technique should include a literature review on the evolution of the technique.

  Interpret the sensitivity of mammography

Calculate and interpret the sensitivity of mammography. Diagnostic test with Sensitivity 50%, Specificity 50% and prevalence 50%. Crude mortality rate. Damage caused by motor vehicle accidents.

  Discuss the role that science plays in your daily life

Role that science plays in your daily life and Integrity, Intensity, Innovation, and involvement in scientific field

  Prepare a flexible budget gator divers

Prepare a Flexible Budget Gator Divers is a company that provides diving services such as underwater ship repairs to clients in the Tampa Bay area.

  Neurological disorders

Designing a neuroprosthesis for the neurological disorders

  Complexity of cell surfaces

Lipid rafts provide another example of the complexity of cell surfaces in both their structural character and biologic functionality. Please explain the nature of these structures and their functionality.

  Exploratory activity on bird beaks

Describe how natural selection and evolution are demonstrated by this activity

  Spatial and temporal variation of heat content in the upper

In this study the temporal and spatial variation of heat content in the upper 70m layer of the Arabian Sea was for a period of 1991 to 2008 have been attempted.

  Earthquake databases

Earthquake Databases

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