Question

Please solve the questions using R language and attach the script with it!!!

zoom it if the picture is not clear.

What is the probability that a penny I have will land heads when tossed? To analyze this question I randomly toss the coin,

Please solve the questions using R language and attach the script with it!!!

Please solve the questions using R language and attach the script with it!!!

0 0
Add a comment Improve this question Transcribed image text
Answer #1

(a) The correct answer is p*(1-p)/n

(b)The correct answer is sqrt(p*(1-p)/n)

(c)\hat p=\frac{x}{n}=\frac{2500}{3901}=0.64086

(d)V(x)=npq if x represents the number of heads in n tosses and it follows the Binomial distribution with parameter n(sample size=3901) and p(probability of success, where success refers getting head in a toss).

So standard deviation of X is sqrt(n*p*(1-p)) where is ptot.

(e) we know critical value is 2.053749

P(|\frac{x-np}{\sqrt{np(1-p)}}|<z_{0.02})=0.96\\ z_{0.02 } \,$can be found from standard normal table$\\ P(|\frac{x/n-p}{\sqrt{p(1-p)/n}}|<z_{0.02})=0.96\\ P(|\frac{\hat p -p}{\sqrt{p(1-p)/n}}|<z_{0.02})=0.96

From this we can find confidence interval and others answers.#x-number of successes in n tosses of #n-number of tosses x-2500; n-3901 #(a) here p represents phat p-x/n Coin Run 4 Source> #X-number of successes in n tosses of a coin > #n=number of tosses > X-2500; n-=3901 > #(a) here p represemts phat > p-x/n#(e)to find the criti cal value we need z1 such that P(lz]kz1)=.96 (from standard normal distribution) 1-gnorm(0.02 0.1.1owe​​​​​​(f)96% ci (.6250862,.6566364)

(g)length of ci is 0.03155023

(H)sample size should be 750 approximately.+ n Pa PZ002 16 CI ven P- O02 Noo, t sh mld be oIS Langtn 2 2002 2- eus 0 152 So L 2 002 TOin R code picture we have found the value of n solving this equation.

Add a comment
Know the answer?
Add Answer to:
Please solve the questions using R language and attach the script with it!!! zoom it 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
  • *ANSWER USING R-SCRIPT* We desire to know the probability that a voter supports a controversial rose...

    *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...

  • ANSWER ALL OF THE QUESTIONS WITH R CODE (SHOW ALL THE STEPS FOR THE R CODE!)...

    ANSWER ALL OF THE QUESTIONS WITH R CODE (SHOW ALL THE STEPS FOR THE R CODE!) THANK YOU!! R problems For questions 1 and 2, load in and attach the Getting to Know You Survey for Spring 2018 using the following code: NoU <-read. csr(file = "http://users, stat . umn .edu/~kinne 174/Getting2NoUS 18 .csv", header = TRUE) attach(NoU) Assume that this survey is a random sample drawn from the population of interest which is all University of Minnesota students. 1....

  • PLEASE INSERT R SCRIPT We wish to compare the expected values, μΧ andHy of two independent...

    PLEASE INSERT R SCRIPT We wish to compare the expected values, μΧ andHy of two independent normal populations, say X and Y, with known standard deviations σχ-8.3 and Ơy-10.1 . we take a random sample of size 13 from X ( X1M, ,x13 ) and a random sample of size 7 from Y ( Yi,½, , ) as follows: X: 0.54, -3.67, 1.41, 23.51, 20.77, 15.90, 16.70, 2.48, 12.27, 2.64, 22.12, 14.03, 17.80 Y: 21.22, 12.61, 15.04, 14.51, 10.91, -4.90,...

  • Solve using R and show R code Instruction: Please submit your R code along with a...

    Solve using R and show R code Instruction: Please submit your R code along with a brief write-up of the solutions. Some of the questions below can be answered with very little or no programming. However, write code that outputs the final answer and dos not ryuira uper calceulatioms. Q.N. 1) The mammals data set in the MASS package records brain size and body size of 62 different mammals a) Fit a regresion model to describe the relation between brain...

  • Using R to solve these questions: 1.Consider the following dataset: fuel <- c(0.95, 0.52, 0.82...

    Using R to solve these questions: 1.Consider the following dataset: fuel <- c(0.95, 0.52, 0.82, 0.89, 0.81) The numbers correspond to the amount of fuel burnt by a new type of high-efficiency engine under a randomised test load. A value of 1 corresponds to the same fuel efficiency as the old engine, values greater than one correspond to more fuel burned (hence lower efficiency) and values less than one correspond to greater efficiency. (a) One-sided or two-sided test? Justify. (b)...

  • Please help me write these in R script / Code 1, Suppose you're on a game...

    Please help me write these in R script / Code 1, Suppose you're on a game show, and you're given the choice of three doors. Behind one door is a car; behind the others, goats. You pick a door, say #1, and the host, who knows what's behind the doors, opens another door, say #3, which has a goat. He then says to you, "Do you want to pick door #2?" What is the probability of winning the car if...

  • Use R - stuido 6. Consider a fair coin. If Y = # of tosses until first H, what are P(success), EY...

    Use R - stuido 6. Consider a fair coin. If Y = # of tosses until first H, what are P(success), EY, and VY? 7. Next, take a quarter and record # of tosses until first H. Do this experiment 30 times: so that your first experiment consists of your tosses up to your first H, and you record the number of T before the coin came up heads. Then you pretend to start over: reset your count and toss...

  • Use R instead of a calculator for Questions 5 and 6. Please attach the R commands...

    Use R instead of a calculator for Questions 5 and 6. Please attach the R commands output and graphs that you used to answer the question. The R output alone is not an answer to the question. Please write a sentence or two to properly answer each question. Assume that the distribution of the duration of human pregnancies can be approxi- mated with a normal distribution with a mean of 266 days and a standard deviation of 16 days (a)...

  • Please answer all questions Question 30 1 pts Solve the problem. To help consumers assess the...

    Please answer all questions Question 30 1 pts Solve the problem. To help consumers assess the risks they are taking, the Food and Drug Administration (FDA) publishes the amount of nicotine found in all commercial brands of cigarettes. A new cigarette has recently been marketed. The FDA tests on this cigarette yielded mean nicotine content of 24.4 milligrams and standard deviation of 2.2 milligrams for a sample of r9 cigarettes. Construct a 95% confidence interval for the mean nicotine content...

  • Solve it using matlab and there is an example for a similar one i put •...

    Solve it using matlab and there is an example for a similar one i put • Write a function calculate_mean_ci(). The inputs to this function are of the form (x, sigma, level). These are x: a numeric vector. sigma : population standard deviation. level : the confidence level given as a percentage, e.g., 95. • The output is a vector of length two of the form (lwr, upr), where lwr = - 20.025 4 and upr = 1 + 20.025...

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