Question

Using only R -Code #The rain probability for the month of July in the city of...

Using only R -Code

#The rain probability for the month of July in the city of Portland is 72%

#(a) What is the probability that it rains exactly 11 days

#(b) What is the probability that it rains 11 or fewer days?

#(c) What is the probability that it rains 27 or more days?

#(d)Generate 10000 random numbers using rnorm function. Show how this distribution would look like. Add in the plot the mean, median and 20% trimmed mean (provide these values).

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

#a
dbinom(11,31,0.72)

#b
pbinom(11,31,0.72)

#c
1-pbinom(26,31,0.72)

#d
z=rnorm(10000)
plot(z)
M1=mean(z)
Med=median(z)
M2=mean(z,trim=0.2) # 20% trim mean
M1
Med
M2
X=c(M1,Med,M2)

points(X,pch=24,col="red")

Output

[1] 2.00244e-05
[1] 2.495013e-05
[1] 0.04033098
[1] mean= -0.0007766617
[1] median= 0.002720538
[1] trimmed mean= 0.002691458

Add a comment
Know the answer?
Add Answer to:
Using only R -Code #The rain probability for the month of July in the city of...
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
  • Using R programming language.Show me the code. id   fruit_day 1   15.93 2   18.37 3   16.8 4  ...

    Using R programming language.Show me the code. id   fruit_day 1   15.93 2   18.37 3   16.8 4   17.86 5   19.01 6   18.97 7   19.36 8   15.57 9   13.71 10   18.44 11   17.21 12   8 13   16.71 14   3 15   NA The above is the dataset. a)Creat a histogram and box plot.How many outliers are present (b) Find the mean, median, and trimmed mean (20%) of the fruit day variable. (c) Create a density plot of the fruit day variable. (d) Add...

  • Using R program: Read and try out the list of comments and examples in Appendix A:...

    Using R program: Read and try out the list of comments and examples in Appendix A: A Sample Session in the "An Introduction to R" textbook. Then solve the following exercises in R. Use the help function if needed in the increments of 1.Generate a vector a between 0 and 100 Create a vector b with 100 pseudo-random numbers in it Plot a on the x-axis and b on the y-axis. Make a data frame of two columns a and...

  • R studio #Exercise : Calculate the following probabilities : #1. Probability that a normal random variable...

    R studio #Exercise : Calculate the following probabilities : #1. Probability that a normal random variable with mean 22 and variance 25 #(i)lies between 16.2 and 27.5 #(ii) is greater than 29 #(iii) is less than 17 #(iv)is less than 15 or greater than 25 #2.Probability that in 60 tosses of a fair coin the head comes up #(i) 20,25 or 30 times #(ii) less than 20 times #(iii) between 20 and 30 times #3.A random variable X has Poisson...

  • Solve d,e and f please using R code Part I: qqplots This part deals with qqplots...

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

  • This course is actually Quantitative Methods and Analysis In Unit 2, you have learned about three...

    This course is actually Quantitative Methods and Analysis In Unit 2, you have learned about three different types of distributions: Normal, binomial, and Poisson. You can take data that you collect and plot it out onto graphs to see a visual representation of the data. By simply looking at data on a graph, you can tell a lot about how related your observed data are and if they fit into a normal distribution. For this submission, you will be given...

  • Could anyone help add to my python code? I now need to calculate the mean and...

    Could anyone help add to my python code? I now need to calculate the mean and median. In this programming assignment you are to extend the program you wrote for Number Stats to determine the median and mode of the numbers read from the file. You are to create a program called numstat2.py that reads a series of integer numbers from a file and determines and displays the following: The name of the file. The sum of the numbers. The...

  • what code in R should I use if I want to achieve 10 different outputs with the same n. n= a number that doesnt satisfies the CLT my distributions are pois(0.8) and t(2) the one I used is below but...

    what code in R should I use if I want to achieve 10 different outputs with the same n. n= a number that doesnt satisfies the CLT my distributions are pois(0.8) and t(2) the one I used is below but I don’t think it’s right if anyone can help me please resolve this code so I can do the same thing with 10 different values of n. and of that n I need to know the mean, the min, max,...

  • Please Answer ONLY F1, F2 and G . Thanks Problem: Daycare Management You've been hired as...

    Please Answer ONLY F1, F2 and G . Thanks Problem: Daycare Management You've been hired as the Chief Statistician for the SummerlsFun Co. The corporation operates a variety of Summer Children Camp/Daycare chains: ParentsOasis SunAndPlay NoPlaceLikeHome As part of their ongoing marketing effort, SummerIsFun Co. collects a variety of statistics about their members. The database includes the following data (a) Child's age category: infant, toddlers, preschool, pre-K к} (b) Child's BMI category: underweight, normal weight overweight, obese (e) Number of...

  • One measure of variation that we can look at is the Range when we have continuous...

    One measure of variation that we can look at is the Range when we have continuous variables. We will be using this measure to create a histogram. A histogram is used to show the frequencies of certain events or categories of data values in a set of data from one time period. Data are plotted in increasing or deceasing order based on the frequency count for each data categories. Assignment I Below is a data file containing the average number...

  • **R-STUDIO KNOWLEDGE REQUIRED*** PLEASE ANSWER THE FOLLOWING WITH ****R-STUDIO**** CODING- thank ...

    **R-STUDIO KNOWLEDGE REQUIRED*** PLEASE ANSWER THE FOLLOWING WITH ****R-STUDIO**** CODING- thank you so much!! I am specifically look for the solution to part ***(h)**** and *****(i)***** below using R-Studio code: The data set in question is: YEAR Height Stories 1990 770 54 1980 677 47 1990 428 28 1989 410 38 1966 371 29 1976 504 38 1974 1136 80 1991 695 52 1982 551 45 1986 550 40 1931 568 49 1979 504 33 1988 560 50 1973 512...

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