
Code:
##Arguments by position##
##0.9 FOR 90th percentile, mean is 100
##and standard deviation is 10
qnorm(0.9, 100, 10)
##Arguments by names##
##0.9 FOR 90th percentile, mean is 100
##and standard deviation is 10
qnorm(0.9, mean = 100, sd = 10)
##90th percentile means P(X>90)
##By default pnorm gives the value of P(X<90)
##We can't change the tail values in this case
##So to use the value of P(X>90) we subtract the default value
from 1
1-pnorm(0.9, mean = 100, sd = 10)
##90th percentile means P(X>90)
##By derault lower.tail=TRUE gives P(X<90)
##So to use the value of P(X>90) we can use
lower.tail=FALSE
pnorm(0.9, mean = 100, sd = 10,lower.tail = FALSE)
##Use ppois function for pois distribution
##For X=4, we use the default value of lambda
##and need not use value of tail, so lower value is assigned to
FALSE
ppois(4, lambda=3, lower=FALSE)
##For X<=3, we use the default value of lambda
##and as X is <=3, we can use default value of tail which is
TRUE
ppois(3, lambda=3,lower.tail = TRUE)
##For X>2, we use the default value of lambda
##and as X is >2, we have to use the different value of tail
which is FALSE
ppois(2, lambda=3,lower.tail = FALSE)
Answer 5 and 6, using R programming code: 5. We have seen the following functions dnorm...
Find the following probabilities for the standard normal distribution in R or using the standard normal table. Note I always recommend drawing the distribution. (Round your answers to four decimal places) ### Example R code mu-o: sigma = 1: x = x; # Note you will have to change the value of x. pnorm(x,mu.sigma) (a) PIX s 0.41) (b) P(X 2041) () PIXs-4.25) Find the following percentiles for the standard normal distribution in Ror using the standard normal table. (Round...
Will rate!!
Find the felouring probabilities for the standard normal distribution in R or using the standard normal table, Note 1 always recommend drasing the distribution. (Roand your answers to four decimal places.) "#+ Ex.mple R cede mw-0; sigm a-1; x-x; # Nobe you will have to change the value of x. pnorm(x.mu,sigma) (๑) p(X s 1.61) (b) P(x a 1-61) (c) P(X s -4.33) Find the following percentiles for the standard normal distribution in R or using the stanéard...
What is the code and result in Rstudio or R
1. Suppose we have a random sample 1.12, 0.44, -1.49, 0.02, 0.81, -1.34,1.34, 0.51,-0.12, 0.97. (a). Use two methods to find the sample mean (b). Use two methods to find the sample variance. (c). Find the sample standard deviation. 2. We can use function rt(n 100, df 2) to generate a random sample from a t-distribution with two degrees of freedom. The sample size is n 100. (a). Generate a...
Problem 1. Consider the two data collections (x,..-, X) and (y,. ya). The median difference statistic is the median of the (v-x) differences for the mn possible (x, y.) pairings, i= 1, ..., mandj = 1, . . ., n. Construct two specific data collections (x,. Xm) and (y,. .. V) that demonstrate that the median difference statistic is not equal to the difference in the separate medians for the two collections Problem 2. A Venn diagram is a graphical...
Answer the following questions: The team A has a winning probability whenever it plays. If the team plays 4 games then find the probability that A wins: (i) Only two games. (ii) At least one game. (iii) More than half of the games. (iv) What is the expected value and the standard deviation of the number of winning? (II) If X is a random variable with a distribution function: (x2+4x+8). F(x) = {322 -CsxsC cis constant. otherwise then find the...
Please answer the following Question using R-studio
please give me the code
Given the joint probability distribution +xe 0 for 0<x,xx<1 f(x elsewhere Use R function to find P[(X, X2,X) e A], where A is the region 1 1 <x<1,x 2 2
10 marks Let X~ Poisson(A), which has density 5 marks Find the relative errors when P(O Y 3 2) is approximated by using the standard normal distribution, for λ = 1, 102, 104, 106, respectively (For u 0, the relative error is defined as E-11-aa statistical software to find probability values.) Vapprox/v. You may use R or any
10 marks Let X~ Poisson(A), which has density
5 marks Find the relative errors when P(O Y 3 2) is approximated by...
Solve d,e and f please using R code
Part I: qqplots This part deals with qqplots of all kinds. Let's do some easy expe riments, first. Let's take a sample from a normal distribution with mu-2, sigma 3, and then look at the hist and the qqplot of that data: set.seed(3) n 100 # Sample size x norm(n,2,3) # Sample from N(mu-2, sigma-3) hist(x) # Looks normal. But that depends on breaks. qqnorm(x) # This doesn't depend on binsize, and...
P7
continuous random variable X has the probability density function fx(x) = 2/9 if P.5 The absolutely continuous random 0<r<3 and 0 elsewhere). Let (1 - if 0<x< 1, g(x) = (- 1)3 if 1<x<3, elsewhere. Calculate the pdf of Y = 9(X). P. 6 The absolutely continuous random variables X and Y have the joint probability density function fx.ya, y) = 1/(x?y?) if x > 1,y > 1 (and 0 elsewhere). Calculate the joint pdf of U = XY...
*ANSWER USING R-SCRIPT* We desire to know the probability that a voter supports a controversial rose proposal. From a random sample of 3100, x =1331 voters support the rose proposal. Let phat be the sample proportion supporting the rose proposal. Answer the following: a) what is the variance of p hat b) As a function of p, what is the standard deviation of p hat c) Calculate p hat d) Let ptot be the random variable representing the voters in...