Question

5. In this question, you are asked to learn about the pbinom command in R. If X ~Bin (n.p), then calculating the cdf at r (same as caing Pr (X S) can be done in R using the pbinom command: pbinom(x, n, p) (a) (2 points) Write down the R code to calculate Pr (X 8) if XBin (25,0.4). What is your result from R? result from R? result from R? (b) (2 points) Write down the R code to calculate Pr (X <8) if XBin (25,0.4). What is your (c) (2 points) Write down the R code to calculate Pr (X2 8) if XBin (10,0.5). What is your
0 0
Add a comment Improve this question Transcribed image text
Answer #1

I am attaching the R code for part (a) , (b) & (c)

RStudio hile上dit Lode Yew 쁘ots Session Build Debug Protile Lools Help Go to filefunctian -Addins Project (None) . Environment History Connections i hl D source on save a /. ▼ ← → Runカ→ ナSource . そぢー1-Impor t Dataset ▼ List 1 # (a) R code to calcuate Pr {X 8} Where Bin (25,0.4) Global Enviroient values 3 ans<- pbinom (8, 25,0.4, lower.tail TRUE) 4 print (ans) ans 0.273531450144573 Flles Plots Packages Help Viewer :1lop Level) R script 수 R: The Binomial Distribution , Binomial {stats) The Binomial Distribution Description Density, distribution function, quantile function and random generation for the binomial Find in Topic Console Terminal e R Documentation print(ans) [1] 0.2735315 distribution with parameters size and prob O Type here to search 12 PM 13-Jan-19

Ans Pr (X<=8) = 0.2735315

RStudio ble上dit Lode ew 쁘ots Session Build Debug erorile Lools 비elp Addins ▼ R Project: (None Environment History Connections Source - List 1 # (a) R code to calcuate Pr {X<8} where Bin (25,0.4) Global Eivironment values 3 ans <- pbinom(7, 25,0.4, lower.tail TRUE) 4 print (ans) ans 0.153551734755933 Fles Plots Packages Help Vlewer pbmC 5:1 lop Level) R Script R: The Binomial Distrihution Find in Topic Console Terminal -O pbínom (q, qbinom (p, rbinom (n, size, size, size, prob, prob, prob) lower . tail lowe r . tail TRUE, TRUE, log .p log .p EALSE) FAT,SR) - = - = > ans <-pbi nomC7, 25,0.4, lower . tail = TRUE) print(ans) [1] 0.1535517 Arguments vector of quantiles vector of probabilities number of observations. Iflength ( XI g > 1, the length is taken to be the numher renuired OType here to search 9104 PM 13-lan-19

Ans Pr (X<8) = 0.0546875

RStudio tile Edit Lode 뵈ew 먼ots Session Build Debug motile Loots Help Project: (None) - Environment History Connections 1日-soAns Pr (X>=8) = 0.0546875

Add a comment
Know the answer?
Add Answer to:
5. In this question, you are asked to learn about the pbinom command in R. If...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • . In this question, you are going determine the outcome of a test without assuming that...

    . In this question, you are going determine the outcome of a test without assuming that the sample size condition holds for tests involving a population proportion. Consider the situation described in the box below About 13% of the population is left-handed. A biologist suspects that the scientific community is not like the general population in terms of handedness. He believes that scientists are more likely to be left-handed. He asks 40 scientists and finds that 7 are left-handed. Does...

  • 6. In this question, you are going to study the approximation to binomial probabilities using the...

    6. In this question, you are going to study the approximation to binomial probabilities using the nor mal distribution. The binomial distribution is discrete while the normal distribution is continuous Therefore, we would expect some issues with approximating the binomial with the normal. (a) (2 points) Suppose X ~ Bin (25,04). Calculate E (N) and Var . (b) (4 points) Use the central lit theorem along with (a) to approximate Pr (X 8). Compare this with your result in #4(a)....

  • This is a question about writting R code for a linear regression model. 8. . (13 marks) Given four points (1,0.8)...

    This is a question about writting R code for a linear regression model. 8. . (13 marks) Given four points (1,0.8), (4,4.2), (5,4.7) and (7,7.8), write down your R code to Build the linear regression model. (a) (4 marks) Predict the results on the new data with a sequence of 51 numbers equally spaced (b) values starting from 0 to 8 (4 marks) Generate the plot in Figure 3, where the curved lines are the upper (upr) and lower (c)...

  • R is a little difficult for me, please answer if you can interpret the R code, I want to learn better how to interpret the R code 4. each 2 pts] Below is the R output for a simple linear regression m...

    R is a little difficult for me, please answer if you can interpret the R code, I want to learn better how to interpret the R code 4. each 2 pts] Below is the R output for a simple linear regression model Coefficients: Estimate Std. Error t value Pr(>t) (Intercept) 77.863 4.199 18.544 3.54e-13 3.485 3.386 0.00329* 11.801 Signif. codes: 0 0.0010.010.05 0.11 Residual standard error: 3.597 on 18 degrees of freedom Multiple R-squared: 0.3891, Adjusted R-squared: 0.3552 F-statistic: 11.47...

  • Question 11     You are in the oranges directory. Write the command to copy the mandarin...

    Question 11     You are in the oranges directory. Write the command to copy the mandarin file to the apples directory. Use a relative path. 2 points Question 12     Which command do you use to rename files and directories?        A.         uname        B.         mv        C.         rn        D.         rename 2 points Question 13     You are in the oranges directory. Write the command to list...

  • question 9 from A to F 9. (5 points) Please answer the following questions about the...

    question 9 from A to F 9. (5 points) Please answer the following questions about the function fr) - 21² f(x) = 2.9 al num- increas- for the Instructions: . If you are asked for a function, enter a function. - If you are asked to find X- or y-values, enter either a number or a list of numbers separated by commas. If there are no solutions, enter None. . If you are asked to find an interval or union...

  • Problem 4 (7 points): What is the output (printed to command prompt) of the following code...

    Problem 4 (7 points): What is the output (printed to command prompt) of the following code (Exam2Prob4.m)? DO NOT USE MATLAB for solving this problem. ZERO CREDIT if all steps are not shown. You should explain the output of each code as if you are executing the code. (answer 2 points; process, with each step - 8 points) Exam2 Prob4.m clc; clear; close all; p=4; q = 3; r5; (x, y] = user Defined (p, q, r); fprintf('x- $d, y=%d',x,y);...

  • R code all steps (copy paste it) - for all answers . R problem 1: Cernsus...

    R code all steps (copy paste it) - for all answers . R problem 1: Cernsus At School is a project that engages students in grades 4 - 12. The data from the project contains many variables. In this problem we will examine the following variables: -Languages.spoken: the number of languages a student can hold an everyday conversation Armspan.cm: the physical measurement of the length from one end of a student's arms (measured at the fingertips) to the other when...

  • You are asked to prepare a software for kids to learn addition, subtraction and multiplication for...

    You are asked to prepare a software for kids to learn addition, subtraction and multiplication for numbers from 1 to 10. Ensure that the answer is always positive. The software will prepare objective questions with four choices. The answer provided by the kid will be checked by the software. After the session is over, the software will provide a summary. Number of questions answered will depend on the kid. The questions are generated randomly. The multiple choices are also generated...

  • Please help this out with all Purpose: Learn how to get input and print out formatted...

    Please help this out with all Purpose: Learn how to get input and print out formatted results using scanf and printf separately in C. 1) Write a C program getPhone Number:c that accepts a phone number from the user in the form XXX-XXX-XXXX, and then displays it in the form (XXX)XXX-XXXX: Enter a phone (XXX-XXX-XXXX): 011-123-4567 You entered (011) 123-4567 Question: Execute your getPhoneNumber.c and attach a screenshot of the output. Then write the source code of getPhoneNumber.c in your...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT