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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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