Write a script in r that computes the probability

Assignment Help Computer Engineering
Reference no: EM132213370

Write a script in R that computes the probability that two or more students have a same birthday for either of the following cases.

(a) For a class of 26 students

(b) For a class of N students, where N is specified once in the beginning of the code, or inputted by the user.

Next, you will write a code to simulate multiple classrooms.

Assume that each classroom has 26 students. Additionally, each student has an equally likely chance of having one of the 365 birthdays.

(a) Let N = 100 be the number of classrooms (ie. You are sampling 100 random classrooms of 26 students.)

Record the number of classrooms, out of 100, in which there are two or more students who share a birthday. Find the proportion of the classrooms in which there are two or more students who share a birthday.

(b) Repeat (a) for 500, 1000 and 2000 classrooms.

(c) Summarize the results from Problem 3 in a table and with complete sentences (typed). Include your codes in your write-up.

Reference no: EM132213370

Questions Cloud

Write a segment of code that reads a sequence of integers : Write a segment of code that reads a sequence of integers from the keyboard until the user enters a negative number.
What is the ethical dilemma conflict presented in scenario : BUGEN 5930 Federation University, Australia. Develop a fictional scenario that outlines the emergence of an ethical dilemma in a workplace of your choosing
Which of the four options should be chosen : The ABC Storage Company provides warehouse facilities mainly for household goods moving companies. Up until now, ABC has fully retained all theft and burglary.
How would husky reflect the change in value : Assume that on December 31, 2017 the forward price for March 2018 delivery of oil has increased to $73.50 per barrel. Since Husky is a calendar year-end firm.
Write a script in r that computes the probability : Write a script in R that computes the probability that two or more students have a same birthday for either of the following cases.
How much equity do you need to purchase the property : Assume for the purposes of this question that the price you are paying for this property is the value that you calculated using your assumed cap rate.
Compute the sum of the items in the list using attributes : Write sematic rules for each production that compute the sum of the items in the list using attributes grammar.
Describe underwriter profits from the overallotment option : Explain what will happen if the price of the stock increases to $22. Describe the underwriter profits from the overallotment option in your explanation.
Write a sequence of statements that use only push and pop : Write a sequence of statements that use only PUSH and POP instructions to exchange the values of eax and ebx registers.

Reviews

Write a Review

Computer Engineering Questions & Answers

  What is the most significant disadvantage of fso

What is the most significant disadvantage of FSO? What does occur after a device has been authenticated to a BS with a digital certificate?

  Identify the potential risks found in the organization

Identify the potential risks found in the organization and for it's ability to function in it's chosen business vertical

  What is the storage requirement for gaussian elimination

What is the storage requirement for Gaussian elimination on an N-by-N matrix with only 3N nonzero elements?

  What is the period of the external signal

Assuming a 2 MHz counter clock frequency. what is the period of the external signal in Figure?

  Identify the principle for each letter

Each of the following heuristics helps make a good module according to some modularity principle. Identify the principle for each letter.

  Why financial situation is needed by a key decision maker

From the System Analyst's perspective, below are several situations calling for decisions about output, content, output methodology, distribution and son on. For each situation, note down the appropriate output decision. Be brief.

  Description of the steps performed for each the steps

The objective of this assignment to is make multiple backups of databases and then to restore the databases from the backups you've created.

  Write a program that outputs all 99 stanzas

Write a program that outputs all 99 stanzas of the "Ninety Nine Bottles of beer on the Wall" song. Your program should print the number of bottles in English, not as a number.

  How much storage will probe require if it is to gather data

During each cycle of the system clock, the status of these five registers is written to nonvolatile memory attached to the probe circuitry. If each register is 64 bits wide, how much storage will the probe require if it is to gather data for 2 sec..

  Write the thoughts according to you

All doctor offices have not become 100 percent computerized yet. You can still see good % of offices use manual patient record files indexed by the first letter of patients' last names.

  Express a mechanism to access the telephone customer

express a mechanism to access the telephone customer.describe your selection and discuss the speed of the search operation. Keep in mind that a million records cannot be kept in one array. There is no need to code in C++.

  Create a simple yet unique graphic using svg

Using the examples found in the readings for this week, create a simple, yet unique graphic using SVG.

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