Question

In: Statistics and Probability

R studio: Show detailed working, including appropriate mathematical notation for each question. For most questions this...

R studio: Show detailed working, including appropriate mathematical notation for each question. For most questions this will involve showing your working from R, (e.g. cut-and-paste commands and output from an R session).

The probability of a student owning a cat is known to be 0.44; and the probability of a student owning a dog is known to be 0.54. If the probability of owning both is known to be 0.36, calculate:

(a) the probability of not owning a dog

(b) the probability of owning either a cat or a dog or both

(c) the probability of a student owning a dog, given that they own a cat

(d) Are owning a cat and dog independent? Justify (e) (harder) a group of 32 vetinary science students is interviewed. Of these 32, only 7 have no pet. State a sensible null hypothesis, test it, and interpret.

Solutions

Expert Solution

R Code

pc = 0.44 #probability of owning cat
pd = 0.54 #probability of owning dog
pcd = 0.36 #probability of owning both dog and cat
#(a) probability of not owning dog
1-pd
#(b) probability of owning either a cat or a dog or both
pc + pd - pcd
#(c) probability of a student owning a dog, given that they own a cat
pcd / pc
#(d)
pcd == pc * pd #pcd should be equal to pc * pd for independent

Running the code, we get

(a) the probability of not owning a dog = 0.46

(b) the probability of owning either a cat or a dog or both = 0.62

(c) the probability of a student owning a dog, given that they own a cat = 0.8181818

(d) Are owning a cat and dog independent - No

(e)

probability of not owning any pet = 1 - 0.62 = 0.38

Null Hypothesis H0: p = 0.38

Using R code, we get

> prop.test(7,32,p = 0.38)

   1-sample proportions test with continuity correction

data: 7 out of 32, null probability 0.38
X-squared = 2.8804, df = 1, p-value = 0.08967
alternative hypothesis: true p is not equal to 0.38
95 percent confidence interval:
0.09944097 0.40441815
sample estimates:
p
0.21875

Since p-value (0.08967) is greater than 0.05 significance level, we fail to reject null hypothesis H0 and conclude that there is no strong evidence to warrant the rejection of the claim that proportion of people not owning a pet is 0.38.


Related Solutions

pl use r studio to do that What is the most appropriate analysis to perform on...
pl use r studio to do that What is the most appropriate analysis to perform on the following data?   x<-c(8.1, 9.4, 9.9, 9.6, 10.7, 10.2, 10.4, 13.6, 15.5, 17.8) Y<-c(7.3, 8.6, 9.9, 9.6, 9.3, 9.2, 10.9, 10.7, 11.4, 16.1) Determine Spearman’s Rho coefficient (2dp) for the following data. x<-c(56,56,65,65,50,25,87,44,35) y<-c(87,91,85,91,75,28,122,66,58)
Identify (using the most appropriate of lists, rules, or notation) the elements of each of the...
Identify (using the most appropriate of lists, rules, or notation) the elements of each of the following sample spaces: 1) Weight of a randomly selected crawfish 2) A cubic die and a octahedron (8 sided) die being rolled 3) Human IQ 4) Days till next hurricane hits Baton Rouge 5) A die being rolled until an odd number is obtained thrice in a row
1. For all parts of this question, working is required, including combinatoric/factorial notation as needed as...
1. For all parts of this question, working is required, including combinatoric/factorial notation as needed as well as final answers. a) (*) A gym has the following group fitness sessions:  Zoomba  Body conditioning  Weight lifting  Boxing  Yoga A member can attend one session at most once a day (i.e., once a member has attended Zoomba classes, s/he cannot attend it again that day). The duration of sessions is also unimportant, however, for example, doing Zoomba...
Please Use R studio and show all the steps to answer this question NY Marathon 2013...
Please Use R studio and show all the steps to answer this question NY Marathon 2013 the table below shows the winning times (in minutes) for men and women in the new york city marathon between 1978 and 2013. (the race was not run in 2012 because of superstorm sandy.) assuming that performances in the big apple resemble performances elsewhere, we can think of these data as a sample of performance in marathon competitions. Create a 90% confidence interval for...
Use a combination of words (be concise), mathematical notation, and diagrams to answer this question. Briefly...
Use a combination of words (be concise), mathematical notation, and diagrams to answer this question. Briefly define and describe: (a) Ray parameter [5 points] (b) Normal Moveout (NMO) [5 points] (c) Quality Factor [5 points] (d) Seismic (or acoustic) impedance [5 points] (e) Overdetermined linear inverse problem [5 points] (f) Transmission coefficient [5 points]
THIS QUESTION REQUIRES THE USE OF R STUDIO. ANY ANSWERS GIVEN THAT ARE NOT IN R...
THIS QUESTION REQUIRES THE USE OF R STUDIO. ANY ANSWERS GIVEN THAT ARE NOT IN R STUDIO CODE WILL NOT SUFFICE. SOLVING WITHOUT THE USE OF R STUDIO IS NOT ACCEPTABLE. The previous question was: Annual salaries for a large company are approximately normally distributed with a mean of 49000 dollars and a standard deviation of 2000 dollars. One manager claims that all of his direct reports are paid "above the 75th percentile" for the company. What is the minimum...
Question 3: Show the following verbal expressions (a,b,c,d) for two different sets with the appropriate mathematical...
Question 3: Show the following verbal expressions (a,b,c,d) for two different sets with the appropriate mathematical symbols and definitions for two different sets of definitions.(predicate logic) It is assumed that the first set of definitions is students in the class and the second set of definitions is all people. How could we express e option using propositional logic? a) Some of the students in the class can speak German. b) Everyone in the class is friendly. c) There are those...
Using mathematical notation where appropriate, briefly define the following properties of preferences: (i) completeness, (ii) transitivity,...
Using mathematical notation where appropriate, briefly define the following properties of preferences: (i) completeness, (ii) transitivity, (iii) monotonicity, (iv) convexity, (v) continuity and (vi) rationality
In R/ R Studio, what code would I enter to find the answers to these questions?...
In R/ R Studio, what code would I enter to find the answers to these questions? What is the code to find the descriptive/ summary statistics of all variables in a data set and how do i find the mean values? What is the code to measure the skewness measure of delta time for all of all the values in the data set? What is the code to draw a histogram and q-q plot of the natural log of a...
For each hypothesis test, state the claim in mathematical notation, state H0 and H1, calculate the...
For each hypothesis test, state the claim in mathematical notation, state H0 and H1, calculate the test statistic and p-value (unless given), state your decision about H0 (reject or fail to reject), and state your conclusion in terms of the original claim. 1. At a 0.05 level of significance, test Bill Bradley’s claim that the majority of voters would vote for him. Assume that sample data consists of 1068 randomly selected voters, 540 of whom indicated that they would vote...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT