Math 473: R Homework #4 Name: Due: Thursday, November 7th at the beginning of class; if your homework is submitted at the end of class or later, it will be considered late. Please print this sheet and staple it to the front of your homework. You will not receive any credit for your program if it does not run, if you did not call the program from the R Console window, you call your program more than once from the R Console window, or your program is not done 100% in R. If you write your program line by line at the R prompt, or copy and paste it into the R prompt or submit more than one R program you will not receive any credit. You will not receive any credit for your program if your font is too small (less than 8) to be readable. You will not receive any credit if you do not use the “list” command or a command that performs the same function as “list”. See previous templates for examples. Write one R program to answer the following questions: 1. 48% of men consider themselves professional baseball fans. You randomly select 10 men and ask each if he considers himself a professional baseball fan. Determine the probability that the number of men who consider themselves baseball fans is exactly eight. 2. Fifty-five percent of households say they would feel secure if they had $50,000 in savings. You randomly select 8 households and ask them if they would feel secure if they had $50,000 in savings. Determine the probability that the number of households that say they would feel secure is more than five. 3. 32% of adults say cashews are their favorite kind of nut. You randomly select 12 adults and ask each to name his or her favorite nut. Determine the probability that the number of adults who say cashews are their favorite nut is at most two. 4. 29% of college students say they use credit cards because of the rewards program. You randomly select 10 college students and ask each to name the reason he or she uses credit cards. Determine the probability that the number of college students who say they uses credit cards because of the rewards program is between two and five inclusive. 5. Sixty-six percent of pet owners say they consider their pet to be their best friend. You randomly select 11 pet owners and ask them if they consider their pet to be their best friend. Determine the probability that the number of pet owners who say their pet is their best friend is at least eight. Type a comment next to each line in the R program. The comments should describe what each line does. Hint: See the Probability Distributions handout on Blackboard. Hint: Use the “list” command at the end of the program (see the dice template); assign your answers to variables. Submit a printed version of the following: 1. R program 2. Program output: answers to each of the 5 questions Grade distribution: 15 points: function comments 10 points: R Console window (need to show that you compiled the function using the source command, and need to show that you called the function) 75 points: function output (print R Console screen; 15 points for the correct answer to each problem; print R Console screen).
Please i need full R program not only the out put i need the program line by line from the syntax to the out put.. thank you
In: Math
Twenty years ago, 52% of parents of children in high school felt it was a serious problem that high school students were not being taught enough math and science. A recent survey found that 209 of 700 parents of children in high school felt it was a serious problem that high school students were not being taught enough math and science. Do parents feel differently today than they did twenty years ago? Use the alpha equals 0.1 level of significance. Click here to view the standard normal distribution table (page 1).LOADING... Click here to view the standard normal distribution table (page 2).LOADING... Because np 0 left parenthesis 1 minus p 0 right parenthesisequals 174.7 greater than 10, the sample size is less than 5% of the population size, and the sample can be reasonably assumed to be random, the requirements for testing the hypothesis are satisfied. (Round to one decimal place as needed.) What are the null and alternative hypotheses? Upper H 0: p equals 0.52 versus Upper H 1: p not equals 0.52 (Type integers or decimals. Do not round.) Determine the test statistic, z 0. z 0equals nothing (Round to two decimal places as needed.) Determine the critical value(s). Select the correct choice below and fill in the answer box to complete your choice. (Round to two decimal places as needed.) A. z Subscript alphaequals nothing B. plus or minusz Subscript alpha divided by 2equalsplus or minus nothing Choose the correct conclusion below. A. Reject the null hypothesis. There is insufficient evidence to conclude that the number of parents who feel that students are not being taught enough math and science is significantly different from 20 years ago. B. Do not reject the null hypothesis. There is sufficient evidence to conclude that the number of parents who feel that students are not being taught enough math and science is significantly different from 20 years ago. C. Do not reject the null hypothesis. There is insufficient evidence to conclude that the number of parents who feel that students are not being taught enough math and science is significantly different from 20 years ago. D. Reject the null hypothesis. There is sufficient evidence to conclude that the number of parents who feel that students are not being taught enough math and science is significantly different from 20 years ago.
In: Math
Below is a table displaying the number of employees (x) and the profits per employee (y) for 16 publishing firms. Employees are recorded in 1000s of employees and profits per employee are recorded in $1000s.
| Profits ($1000s) | 33.5 | 31.4 | 25.0 | 23.1 | 14.2 | 11.7 | 10.8 | 10.5 | 9.8 | 9.1 | 8.5 | 8.3 | 4.8 | 3.2 | 2.7 | -9.5 |
| Employees (1000s) | 9.4 | 6.3 | 10.7 | 7.4 | 17.1 | 21.2 | 36.8 | 28.5 | 10.7 | 9.9 | 26.1 | 70.5 | 14.8 | 21.3 | 14.6 | 26.8 |
What is the correlation between these two variables?
If a linear regression model were fit, what is the value of the slope and the value of the y-intercept?
In a test for the slope of the regression line being equal to zero versus the two-sided alternate, what is the value of the test statistic and the p-value?
In: Math
A consultant for a large university studied the number of hours per week freshmen watch TV versus the number of hours seniors do. The result of this study follow. Is there enough evidence to show the mean number of hours per week freshman watch TV is different from the mean number of hours seniors do at alpha= 0.01?
| Freshmen | Seniors | |
| n | 8 | 4 |
| xbar | 18.2 | 11.9 |
| s | 7.8740 |
3.9749 |
For the Hypothesis stated above (in terms of Seniors- Freshmen)
What are the critical values?
What is the decision?
What is the p-value? (Round off to 4 decimal place)
In: Math
You have five groups using different exercise techniques and you want to compare the average number of pounds lost. What test would be appropriate?
a. T-test
b. ANOVA
c. Person's correlation coefficient
d. Chi-square
In: Math
A simple random sample from a population with a normal distribution of 100 body temperatures has a mean of 98.40 and s=0.68 degree F. Construct a 90% confidence interval.
In: Math
Anystate Auto Insurance Company took a random sample of 370
insurance claims paid out during a 1-year period. The average claim
paid was $1580. Assume σ = $250.
Find a 0.90 confidence interval for the mean claim payment. (Round
your answers to two decimal places.)
| lower limit | $ |
| upper limit | $ |
Find a 0.99 confidence interval for the mean claim payment. (Round
your answers to two decimal places.)
| lower limit | $ |
| upper limit | $ |
In: Math
Let xi, i = 1,2,...,n be independent realizations from a population distributed like a Pareto with unknown mean.
(a) Compute the Standard Error of the sample mean. [Note:
By“compute”, I mean “find the formula for”]. What is the
probability that the sample mean is two standard deviations larger
than the popula-
tion mean?
(b) Suppose the sample mean is 1 and the Standard Error is 2. Con- sider a test of the hypothesis that the population mean is 0, against the alternative that it is greater. What is the p−value? Compute a 5% confidence interval [Note: Use the Normal as an approx- imation for simplicity]. What is the type II error if the actual population mean is 2?
In: Math
Customers arrive at a grocery store at an average of 2.1 per
minute. Assume that the number of arrivals in a minute follows the
Poisson distribution. Provide answers to the following to 3 decimal
places.
Part a)
What is the probability that exactly two customers arrive in a
minute?
Part b)
Find the probability that more than three customers arrive in a
two-minute period.
Part c)
What is the probability that at least seven customers arrive in
three minutes, given that exactly two arrive in the first
minute?
question c is not 0.442
In: Math
A fitness course claims that it can improve an individual's physical ability. To test the effect of a physical fitness course on one's physical ability, the number of sit-ups that a person could do in one minute, both before and after the course, was recorded. Ten individuals are randomly selected to participate in the course. The results are displayed in the following table. Can it be concluded, from the data, that participation in the physical fitness course resulted in significant improvement?
Let d=(number of sit-ups that can be done after taking the course)−(number of sit-ups that can be done prior to taking the course). Use a significance level of α=0.1 for the test. Assume that the numbers of sit-ups are normally distributed for the population both before and after taking the fitness course.
Sit-ups before 28 48 25 41 23 25 45 21 37 29
Sit-ups after 40 54 43 55 34 42 52 30 49 43
Step 1 of 5 : State the null and alternative hypotheses for the test.
Step 2 of 5: Find the value of the standard deviation of the paired differences. Round your answer to one decimal place.
Step 3 of 5: Compute the value of the test statistic. Round your answer to three decimal places.
Step 4 of 5: Find the p-value for the hypothesis test. Round your answer to four decimal places.
Step 5 of 5: Draw a conclusion for the hypothesis test.
In: Math
In: Math
Assume that women's heights are normally distributed with a mean given by mu equals 62.2 in, and a standard deviation given by sigma equals 1.9 in.
Complete parts a and b.
a. If 1 woman is randomly selected, find the probability that her height is between 61.9 in and 62.9 in. The probability is approximately nothing. (Round to four decimal places as needed.)
b. If 14 women are randomly selected, find the probability that they have a mean height between 61.9 in and 62.9 in. The probability is approximately nothing. (Round to four decimal places as needed.)
In: Math
List some evaluation projects for which nonprobability sampling might be appropriate.
In: Math
General guidelines:
Use EXCEL or PHStat to do the necessary computer work.
Do all the necessary analysis and hypothesis test constructions, and explain completely.
Read the textbook Chapter 11. Solve the textbook example on page 403, "Mobile Electronics," in order to compare four different in-store locations with respect to their average sales.
Use One-Way ANOVA to analyze the data set, data, given for this homework.
Use 5% level of significance.
1) Do the Levene test in order to compare the variance of the sales level at four different in-store locations.
2) If there are no significant differences between the variance of sales, then conduct the one-way ANOVA hypothesis test to compare the average sales level at four different in-store locations.
3) If you have seen evidence of difference among the average sales levels at these four different in-store locations, then identify which in-store locations have significantly different average sales than other in-store locations, by using the Tukey procedure
Data Set:
|
In: Math
The annual per capita consumption of bottled water was 30.7 gallons. Assume that the per capita consumption of bottled water is approximately normally distributed with a mean of 30.7 and a standard deviation of 13 gallons.
a. What is the probability that someone consumed more than 31 gallons of bottled water?
b. What is the probability that someone consumed between 25 and 35 gallons of bottled water?
c. What is the probability that someone consumed less than 25 gallons of bottled water?
d. 99.5% of people consumed less than how many gallons of bottled water?
In: Math