Question

In: Statistics and Probability

Instructions: You are not required to use R markdown for the lab assignment. Please include ALL...

Instructions: You are not required to use R markdown for the lab assignment. Please include ALL R commands you used to reach your answers in a word or pdf document. Also, report everything you are asked to do so.

Problem 1 : Consider a binomial random variable X ∼ Bin(100, 0.01). 1. Report P(X = 7), P(X = 8), P(X = 9), try to use one ONE R command to return all these three values. 2. Find the probability P(0 ≤ X < 5), be careful when treating “end points” 0 and 5. 3. We have mentioned on the class Possion distribution could be a good approximation of Binomial distribution under certain conditions. Here, n = 100, p = 0.01, np = 1 looks satisfy the condition that the pmf of X can be approximated by a suitable Possion random variable Y . What is λ of Y ? Compute P(X = i), P(Y = i), i = 0, 1, 2, 3, 4, 5 to show the goodness of the approximation.

Problem 2 : Answer the following questions: 1. First run alphas <- seq(0.1, 1, by = 0.1) and nalphas <- - rev(alphas). Based on what you have seen, decribe how functions seq and rev work. Then run qnorm(c(nalphas, alphas)) and report the result you get. What are they? What pattern did you notice and why? 2. Use the function rnorm to genearate 10000 random numbers from N(50, 4), store those random numbers into a vector called firstrn. It is expected that the sample mean of firstrn should be close to the population mean 50. Use the function mean to verify this. 3. Suppose X ∼ Possion(2). Report the probability that P(1 < X ≤ 5). Show the code you used to reach this answer.

Problem 3 : In lab lecture notes and demo code, I simulated random samples from Exp(1) to verify classical central limit theorem numerically. I also stressed that no matter what type of random samples you use, the standardized partial sum Sn always converge to N(0, 1). In this problem, simulate random samples from the following distributions: 1. Bernoulli(0.5) with µ = 0.5 and σ2 = 0.25. (Hint: You can use rbinom to generate Bernoulli random numbers.) 1 2. Uniform(0, 1) with µ = 0.5 and σ2 = 1/12. 3. Possion(1) with µ = 1 and σ2 = 1. For each case, set simulation times N to be 1000 and for each simulation, generate n = 2000 random numbers. Report 3 pieces of code, 3 Q-Q plots and your conclusion. To get all the answers, you only need slightly adjust my demo code

Solutions

Expert Solution

Given:-
Binomial Random variable X ∼ Bin(100, 0.01)

(1)
#binomial distribution probability mass function with size = 100, prob = 0.01
#probability at X = 7,8,9
dbinom(7:9, 100, 0.01)

which gives output as P(X=7) = 6.286346e-05; P(X=8) = 7.381694e-06; P(X=9) = 7.621951e-07

(2)
P(0<=X<5) will be equivalent to cumulative probability till X=4

#cumulative probability
#P(0<=X<5)
pbinom(4, 100, 0.01)
sum(dbinom(0:4, 100, 0.01))

Both gives same output i.e. P(0<=X<5) = 0.9965677
Either directly use cumulative probability function or sum each probability from 0 to 4

(3)
When binomial distriution is approximated into Poisson distribution, its = np where n = size= 100, p = prob = 0.01
So, = 100*0.01 = 1

Compute poisson distriution prob and binom prob at i = 0,1,2,3,4,5 for goodness of approximation result

#binomial probability at X = 0:5
dbinom(0:5, 100, 0.01)
#poisson probability at Y = 0:5 with = 1
dpois(0:5, 1)

which gives us result as
Binom prob at 0:5 = {0.366032341, 0.369729638, 0.184864819, 0.060999166, 0.014941715, 0.002897787}
Poisson prob at 0:5 = {0.367879441, 0.367879441, 0.183939721, 0.061313240, 0.015328310, 0.003065662}

We can see the corresponding probabilities are approximately same. Hence we can say that poisson distribution in this case is a good approximation of binomial distribution with n = 100, p = 0.01

If you have any doubt, feel free to ask in comment box. Please do upvote.


Related Solutions

Instructions: You are not required to use R markdown for the lab assignment. Please include ALL...
Instructions: You are not required to use R markdown for the lab assignment. Please include ALL R commands you used to reach your answers in a word or pdf document. Also, report everything you are asked to do so. Problem 3 : In lab lecture notes and demo code, I simulated random samples from Exp(1) to verify classical central limit theorem numerically. I also stressed that no matter what type of random samples you use, the standardized partial sum Sn...
PLEASE READ ALL OF THESE INSTRUCTIONS BEFORE BEGINNING THIS ASSIGNMENT. For this assignment, you need to...
PLEASE READ ALL OF THESE INSTRUCTIONS BEFORE BEGINNING THIS ASSIGNMENT. For this assignment, you need to analyze the information below from BOTH the management AND the employee perspective. This information pertains to a labor union in a simulated/made up/not real firm in Glen Ellyn. The first part of your information relates to Management – the second part relates to the Labor Union employees. I have provided you with information from the last union negotiations at the plant in 2016. It...
Instructions Please answer all questions Use the given dataset “Homework_EX_1”. Please include the relevant SPSS output...
Instructions Please answer all questions Use the given dataset “Homework_EX_1”. Please include the relevant SPSS output (such as tables and graphs). Include the screen snapshots of how you specify the model in SPSS (use the “Print_screen” function in your keyboard to capture each screen and paste it in the word document). Please provide a clear WELL-WRITTEN interpretation for each question. Name Variable information Diabetes Diabetes status (Yes, No) Age Age measured in years Race Race of each woman described as...
Assignment Description and Instructions: As a group of prospective entrepreneurs, you are required to prepare a...
Assignment Description and Instructions: As a group of prospective entrepreneurs, you are required to prepare a business plan for a new skin care business (not an existing business/company) to acquire financing. ALL group members are expected to collaborate and contribute to the business plan. Each member will be required to complete peer evaluation of the other team members using the rubric provided. The plan is expected to include: Title page. This should include the company’s name, logo, address and contact...
I want to use R markdown to do the following questions and render a pdf for...
I want to use R markdown to do the following questions and render a pdf for all the answers!!! Q1. Suppose we toss 4 coins (each having heads probability = (1/2). Let X denote the random variable: (number of heads) - (number of tails). (a) What is the range of X? (give exact upper and lower bounds along with a line of explanation) (b) What is the probability mass function of (c) What is the cumulative density function of X...
Instructions (In C++ Please) Verification This programming lab makes use of an array of characters. The...
Instructions (In C++ Please) Verification This programming lab makes use of an array of characters. The program will validate the characters in the array to see if they meets a set of requirements. Requirements: Must be at least 6 characters long (but not limited to 6, can be greater) Contains one upper case letter Contains one lower case letter Contains one digit Complete the code attached. Must use pointer while checking the characters. Download Source Lab 3 File: #include using...
Program Assignment 1 C++ please Instructions This assignment will require the use of three arrays, which...
Program Assignment 1 C++ please Instructions This assignment will require the use of three arrays, which will be used in parallel. Create a program that keeps track of the sales of BBQ sauces for a company. The company makes several different types of sauces, Original, Sticky Sweet, Spicy, Sweet Heat, Hickory Bourbon and Smokey Mesquite. One array will contain the names of the different BBQ sauces. This array will be initialized from a text file with the 6 different names....
For this assignment, you are required to write a MIPS program that reads its own instructions...
For this assignment, you are required to write a MIPS program that reads its own instructions and counts the number of occurrences of each type of instruction (R-type, I-type, or J-type). To accomplish this task, your program should execute the following steps: First, your program should load the address of its first instruction (0x400000) into a register, and initialize three separate instruction class counters to zero. Next, your program should enter a loop that reads each instruction from memory. For...
Please Answer all question and please in detail. The assignment should include an abstract, introduction, conceptual...
Please Answer all question and please in detail. The assignment should include an abstract, introduction, conceptual building of sustainable financial management and sustainable financial growth, results and discussions sections, the project should also include conclusion section. 1. Examining the existing various corporate sustainable reporting disclosure and how they contributes to shared value creation and firms value. 2. Improving financial decision making by linking sustainability issues to financial decisions and key value drivers, such as capital budgeting, the cost of capital,...
In this assignment, you will be required to use the Heart Rate Dataset to complete the...
In this assignment, you will be required to use the Heart Rate Dataset to complete the following: Identify the types of data represented by variables The range or types of values for each variable Give a brief written description of the variables, and how they are used in the data set. Steps Open the Heart Rate Dataset in Excel Identify each of the variables contained in the dataset by type Identify the type of data each variable represents (e.g., qualitative...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT