Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Science Expert

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?

Science, Academics

  • Category:- Science
  • Reference No.:- M9780751

Have any Question?


Related Questions in Science

Physiology signature assignment -for your signature

Physiology: Signature Assignment - For your signature assignment, compose a 3- to 4-page case analysis (in addition to a title, abstract, and a reference page) written in APA format with at least 3 references, with one n ...

Rationalesafety and risk management are critical aspects

Rationale Safety and Risk Management are critical aspects of a workplace and breaches are punishable under Work Health and Safety Law. This task encourages students to analyse and conceptualise responses to safety breach ...

Critical appraisal requirementscritically appraise review

Critical appraisal requirements Critically appraise (review) the literature pertaining to human factors related to work performance and critically analyse the relationship between these and quality and safety in health c ...

Question in a 3 page paper compare and contrast food

Question: In a 3 page paper compare and contrast food insecurity issues in urban environments vs. rural environments. Discuss the role of food security as compared to food justice. The response must be typed, single spac ...

As revenue generators nps must be aware of how their work

As revenue generators, NPs must be aware of how their work contributes to the overall revenue of the clinical practice. You see 20 patients per day on average and take call every third weekend. According to Buppert (2011 ...

Course descriptionthis course provides an opportunity for

Course Description This course provides an opportunity for nursing students to enhance their knowledge of historical and contemporary issues relevant to Aboriginal and Torres Strait Islander people. This course will expl ...

Assignment -in addition to turning in your isite journal

Assignment - In addition to turning in your iSite journal entry as usual, a short paper with emphasis on writing in a scientific format, properly acknowledging resources, and an overview of the process of thermoregulatio ...

Case study now that you understand the basic concepts of

Case Study: Now that you understand the basic concepts of sustainability, resiliency, and biomimicry, please go to Ask Nature.org. Choose an example from the natural world and apply it to the human world. Why did you cho ...

Individual work - personal reflectionreflect on the roles

Individual work - personal reflection Reflect on the roles you performed in this group task and reflect on the ways you impacted on the group. Describe some of the things that you did that were helpful to the group. Desc ...

Midterm exam questions -q1 you are asked to evaluate a

Midterm Exam Questions - Q1. You are asked to evaluate a construction/building project in an area corresponding to the sketch map below. The area has mildly hilly topography and thin soil cover. The bedrock in area X is ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As