Question

In: Math

Use R to do each of the following. Use R code instructions that are as general...

Use R to do each of the following. Use R code instructions that are as general as possible, and also as efficient as possible. Use the Quick-R website for help on finding commands. 1. The following is a random sample of CT scores selected from 32 Miami students. 28, 27, 29, 27, 29, 31, 32, 30, 34, 30, 27, 25, 30, 32, 35, 32 23, 26, 27, 33, 33, 33, 31, 25, 28, 34, 30, 33, 28, 26, 30, 28 (a) Find the mean and standard deviation of this sample. Give the interpretation of the mean in the context. (b) Find the five numbers summary and provide the interpretation of the sample median in the context. (c) Draw the histogram of the data. What can you say about the distribution of the data. (d) Draw the Boxplot of the data. Is there any potential outlier? 2. The weekly amount spent for maintenance and repairs in a certain company has an approximately normal distribution, with a mean of $600 and a standard deviation of $40. If $700 is budgeted to cover repairs for next week, (a) what is the probability that the actual costs will exceed the budgeted amount? (b) how much should be budgeted weekly for maintenance and repairs to ensure that the probability that the budgeted amount will be exceeded in any given week is only 0.1?

Solutions

Expert Solution

Q1 Let X be the CT score of Miami students.

### By using R:

a) > X=c(28,27,29,27,29,31,32,30,34,30,27,25,30,32,35,32,23,26,27,33,33,33,31,25,28,34,30,33,28,26,30,28)
> X
[1] 28 27 29 27 29 31 32 30 34 30 27 25 30 32 35 32 23 26 27 33 33 33 31 25 28
[26] 34 30 33 28 26 30 28
> Xbar=mean(X) ## sample mean
> Xbar
[1] 29.5625
> sd=sd(X) ###standard deviation
> sd
[1] 3.036737

The sample mean is 29.56 which indicates that the average CT score of 32 Miami students is 26.56

b)

> summary(X) ### five point summary
Min. 1st Qu. Median Mean 3rd Qu. Max.
23.00 27.00 30.00 29.56 32.00 35.00

The median is 30.00, which indicates that the median CT score of 32 Miami students is 30.00

c) >hist(X) ### Command for Histogram

From the histogram we say that the distribution of the CT scores is approximately symmetric.

d) > boxplot(X,main="Boxplot")## Command for boxplot

The box-plot does not indicate the presence of potential outliers.

Q2. Let Y be the weekly amount spent for maintenance and repairs in a certain company.

Therefore,

a) The probability that the actual costs will exceed the budgeted amount is given by:

### By using r command:

> 1-pnorm(700,600,40)
[1] 0.006209665

b) The amount that should be budgeted weekly for maintenance and repairs to ensure that the probability that the budgeted amount will be exceeded in any given week is only 0.1 obtained by:

## By using the r command:

> qnorm(0.90,600,40)
[1] 651.2621
Therefore we need to budget $651.26 so that the probability that the budgeted amount will be exceeded in any given week is only 0.1


Related Solutions

Use R code to do the following!!!! 1. Create a vector v1 that will contain integers...
Use R code to do the following!!!! 1. Create a vector v1 that will contain integers from -30 to 60. 2. Copy v1 into a vector v2 and add names 'odd' or 'even' based on the value. 3. Copy v1 into a vector v3 and if the number can be divided by 3, replace it by 'NA'. 4. Assign the mean of v3 to v4 ignoring the 'NA'.
Use R.  Provide Solution and R Code within each problem. For this section use the dataset “PlantGrowth”,...
Use R.  Provide Solution and R Code within each problem. For this section use the dataset “PlantGrowth”, available in base R (you do not need to download any packages). a.Construct a 95% confidence interval for the true mean weight. b.Interpret the confidence interval in 1. in the context of the problem. c.Write down the null and alternative hypothesis to determine if the mean weight of the plants is less than 5. d.Conduct a statistical test to determine if the mean weight...
pl use R code to do that and show me the program Use a linear regression...
pl use R code to do that and show me the program Use a linear regression of Y~log(X) using the labtestdata.csv data to predict Y (2dp) when x = 250 on the unlogged scale? Calculate the F-value (1 dp) from an ANOVA on the regression of Y~log(X) using the data contained in labtestdata.csv abtestdata.csv y x 1.018746 1 1.508895 2 0.727282 3 1.787127 4 2.903983 5 3.181554 6 1.737834 7 2.715766 8 1.570552 9 3.046107 10 4.499675 11 4.240688 12...
Use R.  Provide Solution and R Code within each problem. A study was conducted to determine the...
Use R.  Provide Solution and R Code within each problem. A study was conducted to determine the average weight of newborn babies. The distribution of the weight of newborn babies has a standard deviation of σ = 1.25lbs. A random sample of 100 newborn babies was taken and weights measured. The mean weight of the babies in the sample was 7.3 lbs. a. Construct a 95% confidence interval for the true mean weight of newborn babies. b. Interpret the confidence interval...
Use R to answer the following question. Copy and paste the code and answer from R...
Use R to answer the following question. Copy and paste the code and answer from R into your paper. On the average,five cars arrive at a particular car wash every hour. Let X count the number of cars that arrive from 10 AM to 11 AM. Then X ∼pois(lambda = 5). Also, μ = σ2 = 5.  What is the probability that no car arrives during this period?  Suppose the car wash above is in operation from 8AM...
General Instructions for Discussion Responses to Classmates Create a new thread for each posting. Use correct,...
General Instructions for Discussion Responses to Classmates Create a new thread for each posting. Use correct, complete sentences, in paragraph format, unless otherwise instructed. Use assigned course materials to complete discussion responses. Use in-text citations and a Reference List in APA format to cite the course resource(s) used - an in-text citation cannot exist without a corresponding Reference List, and a Reference List cannot exist without a corresponding in-text citation. Post responses here in public discussion forum. Put the following...
Do the following using R. You must also turn in a copy of your R code....
Do the following using R. You must also turn in a copy of your R code. (10) What is the probability a beta (1, 8) random variable is less than 0.13? (11) What is the probability a beta (3, 9) random variable is greater than .4? (12) What is the probability a beta (18,4.4) random variable is between 0.6 and 0.7? (13) At what value of x is the probability that a beta (4, 7) random varable is less than...
APPLIED STATISTICS 2 USE R CODE! SHOW R CODE Use data file RecordMath2526.txt, to produce a...
APPLIED STATISTICS 2 USE R CODE! SHOW R CODE Use data file RecordMath2526.txt, to produce a plot graph with Exam1 as x, Exam2 as y, use Gender as color, and Hw1 as pch. RecordMath2526 information Index Gender Hw1 Hw2 Hw3 Exam1 Hw4 Exam2 Hw5 Hw6 Hw7 Final 1 F 9 6 8 60 7 82 10 10 9 69 2 M 10 10 10 94 9 98 10 10 8 91 3 M 9 10 8 79 9 55 10...
Use R to complete the following questions. You should include your R code, output and plots...
Use R to complete the following questions. You should include your R code, output and plots in your answer. 1. Two methods of generating a standard normal random variable are: a. Take the sum of 5 uniform (0,1) random numbers and scale to have mean 0 and standard deviation 1. (Use the properties of the uniform distribution to determine the required transformation). b. Generate a standard uniform and then apply inverse cdf function to obtain a normal random variate (Hint:...
Use R to complete the following questions. You should include your R code, output and plots...
Use R to complete the following questions. You should include your R code, output and plots in your answer. 1. Two methods of generating a standard normal random variable are: a. Take the sum of 5 uniform (0,1) random numbers and scale to have mean 0 and standard deviation 1. (Use the properties of the uniform distribution to determine the required transformation). b. Generate a standard uniform and then apply inverse cdf function to obtain a normal random variate (Hint:...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT