Question

In: Math

Part (1) Consider the data in the above table for number of pets in 100 households....

Part (1)

Consider the data in the above table for number of pets in 100 households. Do the following:

1

Number of Pets

0

1

2

3

4+

Count

19

26

29

13

13

  • – Use the R command chisq.test to test whether the data can be fitted by a Poisson model with α = 0.05. Report the p-value and the number of degrees of freedom from your test.

  • – Are there any corrections necessary and if so why?

  • – How would you update the code to include these corrections and what is

    the new p-value obtained?

    Use the R-builtin function dpois to calculate the Poisson probabilities.

  • Part (2)

    Run install.packages(”MASS”) to install the MASS library. Do the follow- ing:

    • – For the data frame survey in this package first remove any NA values with the command survey = na.omit(survey). Following that consider the 2 categorical variables Sex and Exer in survey. How many different types of values does Exer take?

    • – Use the R command chisq.test to test whether there is an association between these variables with α = 0.05. Report the p-value obtained.

    • – Remove the level Freq for the variable Exer and report the p-value ob- tained by running chisq.test between Sex and Exer.

Solutions

Expert Solution

Question 1 - done.


Related Solutions

h2. The table below shows a sample of households and two variables: (1) the number of...
h2. The table below shows a sample of households and two variables: (1) the number of people in the household (2) the weekly pounds of trash generated by the household People in house Pounds of Trash per Week 2 18 3 33 6 93 1 23 7 83 Explain the relationship between the amount of trash per week and the number of people in the household using concepts from linear regression. Provide a comprehensive answer that includes explaining the following:...
The following table is the result of a survey of 1109 households showing the number of...
The following table is the result of a survey of 1109 households showing the number of cars they have: ​​Number of Cars​​ 0 ​1​2​3​≥4 ​​Percent of households​ 19​​13​33​26​9 a- Determine the sample proportion of households that own two or more cars. b- If the proportion of households that own two or more cars is equal to 0.5, determine the probability that in a sample of 999 households at least 509 would own two or more cars. c- The margin of...
The following table is used for a number of questions below. The table above shows the...
The following table is used for a number of questions below. The table above shows the responses of a survey of teenagers aged 14-18 when asked at what age they thought they would become financially independent. Age of Financial Independence Number of Responses 16-20 191 21-24 467 25-27 244 28 or older 42 What do the teens expect is the probability of being financially independent before age 25? A recent Gallup poll found that only 14 percent of 24- to...
In a simple random sample of 100 households, the sample mean number of personal computers was...
In a simple random sample of 100 households, the sample mean number of personal computers was 1.32. Assume the population standard deviation is 0.41. Construct a 95% confidence interval for the mean number of personal computers. (a) (1.24, 1.40) (b) (1.25, 1.39) (c) (0.15, 0.67) (d) (0.19, 0.63)
Data: Pets owned by men: 1, 2, 3, Pets owner by women: 0, 0, 0, 0,...
Data: Pets owned by men: 1, 2, 3, Pets owner by women: 0, 0, 0, 0, 1, 2, 3, 3 Questions: 1a. How many pets do the men in the class own? Write down each data point. 2. What is the mean number of pets the men in class own? 2a. What is the standard deviation of the number of pets the men in class own? You can use Excel for this computation. 3. How many pets do the women...
Consider the following table of data that was generated from randomly surveying 100 people and recording...
Consider the following table of data that was generated from randomly surveying 100 people and recording how much change (from coins) was in their pockets: 0.33 0.01 0.69 0.04 0.46 0.16 1.67 0.12 0.03 0.17 0.09 0.17 0.57 0.04 0.29 0.85 0.46 1.17 0.02 0.12 0.74 1.72 0.28 0.12 1.37 0.61 0.06 1.46 0.42 0.03 0.39 0.10 0.02 0.20 1.08 1.27 0.30 1.13 0.06 0.27 3.76 0.43 0.04 0.37 0.09 0.09 0.22 1.06 0.09 0.01 0.17 1.23 0.12 1.51 0.13...
Consider the set of processes shown in the table above, with the length of the CPU-burst...
Consider the set of processes shown in the table above, with the length of the CPU-burst time given in milliseconds. The processes are assumed to have arrived in the order P5, P4, P3, P2 , and P1, all approximately at time 0. Draw three Gantt charts illustrating the execution of these processes using SJF, Round-Robin (quantum size = 3), and a non-preemptive priority (a smaller priority number implies a higher priority) scheduling. Calculate average waiting time of each scheduling. Calculate...
A random sample of 100 households and collect data on each household’s income. You find a...
A random sample of 100 households and collect data on each household’s income. You find a sample income standard deviation of $160,000. You want to test the null hypothesis that the population mean income is $100,000, using a p-value of 0.05, against the alternative that it does not equal $100,000. You will: A. Reject the null hypothesis if the sample mean is $130,000 B. Fail to reject the null hypothesis if the sample mean is between $80,000 and $120,000 C....
#1) Consider the following table summarizing the speed limit of a certain road and the number...
#1) Consider the following table summarizing the speed limit of a certain road and the number of accidents occurring on that road in January Posted Speed Limit 51 48 43 35 22 20 Reported Number of Accidents 25 29 25 17 19 14 a) Find the slope of the regression line predicting the number of accidents from the posted speed limit. Round to 3 decimal places. b) Find the intercept of the regression line predicting the number of accidents from...
1.) Consider the data in the following table. In this study, the authors were interested in...
1.) Consider the data in the following table. In this study, the authors were interested in the use of erythrocyte sodium (ES) concentration as a potential biomarker for the response to lithium treatment in patients with bipolar illness. The ES levels were measured in 10 bipolar patients before and after treatment with lithium. The ES levels before and after treatment with lithium, as well as the after - before differences are given in Table 1. The authors wished to determine...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT