Question

In: Statistics and Probability

This questions was asked to be done using R language programming. The datasets are available along...

This questions was asked to be done using R language programming. The datasets are available along with MASS package in Rstudio.

A. Package ‘MASS’ which provides a description of the datasets available in the MASS package Then, complete the following analysis of the identified data from the library.

B. One-sample t-test: Use the “chem” dataset to answer the question, “is the flour production company producing whole meal flour with greater than 1 part per million copper in it?”

C. Two-sample t-test: Use the “cats” dataset to answer the question, “do male and female cat samples have the same body weight?” Hint: one way to get separate vectors for male and female cat body weight is to use the subset function as follows: “male <-subset(cats, subset=(cats$Sex=M))”

D. Paired t-test: Use the “shoes” dataset to answer the question, “did material A wear better than material B?”

E. Test of equal or given proportions: Use the “bacteria” data set to answer the question, “did the drug treatment have a significant effect of the presence of the bacteria compared with the placebo?” F. F-test: Use the “cats” data set to test for the variance of the body weight in male and female cats.

Solutions

Expert Solution

Note: Allowed to solved only 4 question. solved from a to e.


Related Solutions

R programming language A) Create a function that accepts two arguments, an integer and a vector...
R programming language A) Create a function that accepts two arguments, an integer and a vector of integers. It returns the count of the number of occurrences of the integer in the input vector. 1]Input: num_count <-function ??? 2]Input: num_count(2,c(1,1,2,2,3,3)) 2] Output: 2 3] Input: num_count(1,c(1,1,2,2,3,1,4,5,5,2,2,1,3)) 3] Output : 4 B) Create a function that accepts 3 integer values and returns their sum. However, if an integer value is evenly divisible by 3, then it does not count towards the...
Please do these questions in the R language 1. Load the cars dataset into R. It...
Please do these questions in the R language 1. Load the cars dataset into R. It is a built-in dataset. 2. Do an str() to determine the number of observations and variables. Enter your answer as a comment. 3. Plot speed on x axis and distance on y axis. 4. Find the correlation between speed and distance. What does the magnitude and sign indicate? Enter your answer as a comment. 5. Build a linear regression model with speed as the...
What is the primary goal in using a scripting language for programming work?
What is the primary goal in using a scripting language for programming work?
1.What is the relationship between the LSD and a Z score? (R programming Language) Write a...
1.What is the relationship between the LSD and a Z score? (R programming Language) Write a fragment of code comparing how both would be computed. Use the Z score for the standard error of a mean, $z_i = (x_i - \mu)/(\sigma / \sqrt(n))$ 2. How would you modify the calculations of LSD to produce Tukey's Honest Signficant Difference?
Discuss the advantages and disadvantages of R programming language in the health care industry. Discuss applications...
Discuss the advantages and disadvantages of R programming language in the health care industry. Discuss applications of R for data analysis and visualization. Discuss three R statements used for decision making. Include three corresponding example statements. Describe two data visualization options in R programming language. Provide an example of a health care data application for each of the visualization options selected (for example, histogram). What is the purpose of the Microsoft Visual Studio? List the commands used to create a...
Use R programming language to answer and please so show the code as well. A paper...
Use R programming language to answer and please so show the code as well. A paper manufacturer studied the effect of three vat pressures on the strength of one of its products. Three batches of cellulose were selected at random from the inventory. The company made two production runs for each pressure setting from each batch. As a result, each batch produced a total of six production runs. The data follow. Perform the appropriate analysis. Table is below Batch Pressure...
In the R programming language, we would like to use the data set called iris to...
In the R programming language, we would like to use the data set called iris to build a simple linear regression model to predict Sepal.Length based on Petal.Length. Calculate the least squares regression line to predict Sepal.Length based on Petal.Length. Interpret the slope of the line in the context of the problem. Remember that both variables are measured in centimeters. Plot the regression line in a scatterplot of Sepal.Length vs. Petal.Length. Test H1: ??1 ≠ 0 at ?? = 0.05...
R programming language. The seafood data recorded the bacterial growth on oysters and mussels. The bacterial...
R programming language. The seafood data recorded the bacterial growth on oysters and mussels. The bacterial counts are measured in log scale at three different times. Convert the data to have one variable showing the bacterial counts and one variable showing the different time points. Seafood time0 time1 time2 Oysters 1.83 3.68 5.23 Oysters 1.11 3.25 4.98 Oysters 2.01 3.98 5.02 Oysters 7.19 7.42 9.32 Oysters 6.89 7.34 8.92 Oysters 7.01 8.11 9.99 Oysters 6.47 9.44 9.78 Oysters 5.98 8.77...
Load the USArrests sample dataset from the built-in datasets (data(USArrests)) into R using a dataframe (Note:...
Load the USArrests sample dataset from the built-in datasets (data(USArrests)) into R using a dataframe (Note: Row names are states, not numerical values!). Use the kmeans package to perform a clustering of the data with increasing values of k from 2 to 10 - you will need to decide whether or not to center/scale the observations - justify your choice. Plot the within-cluster sum of squares for each value of k - what is the optimal number of clusters? Use...
this program is to be done in c language. Using Pointers Create a program pointerTester.c to...
this program is to be done in c language. Using Pointers Create a program pointerTester.c to experiment with pointers. Implement the following steps one by one in your program: YOU NEED TO ANSWER QUESTION Use printf to print your answers at the end(after 12). 1. Declare three integer variables a, b and c. Initialize them to 0, 100 and 225, respectively. 2. Print the value of each variable and its address. 3. Add the following declaration to your code: int...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT