Assignment For this assignment, you will use the dataset weights.csv. This is a dataset of individual weight events for customers. The objective of this assignment is to carry out a 2 sample t test to...

1 answer below »

Assignment


For this assignment, you will use the dataset weights.csv. This is a dataset of individual weight events for customers. The objective of this assignment is to carry out a 2 sample t test to find out:


1. Does the use of receptable type 3, change the weights of receptacle type 1? And if so how?


2. Does the use of receptacle type 3 change the total weight produced? And if so how?




You will prepare and explore the datasets using R data cleaning and analysis techniques and will discuss the discovered trends and plot any points of interest.




Steps should include:




Transform the dataset to summarise the weights for each clCode by receptType. (Use Dplyr)




Create a new variable for each clCode to identify whether they use receptType = 3 and receptType = 1, or only uses receptType = 1. This variable should allow you to create two independent samples. (Use Dplyr)




Check for and handle missing values.




Any clCode beginning with B have been included in error and can be excluded from the analysis




Identify any outliers accounts and produce a list of them. Any outlier clCodes can be excluded from the analysis.




Plot data and identify trends and/or points of interest.


Discuss your findings and prepare explanatory visualisations in an R Markdown (.Rmd) file




Assignment For this assignment, you will use the dataset weights.csv. This is a dataset of individual weight events for customers. The objective of this assignment is to carry out a 2 sample t test to find out: 1. Does the use of receptable type 3, change the weights of receptacle type 1? And if so how? 2. Does the use of receptacle type 3 change the total weight produced? And if so how? You will prepare and explore the datasets using R data cleaning and analysis techniques and will discuss the discovered trends and plot any points of interest. Steps should include: Transform the dataset to summarise the weights for each clCode by receptType. (Use Dplyr) Create a new variable for each clCode to identify whether they use receptType = 3 and receptType = 1, or only uses receptType = 1. This variable should allow you to create two independent samples. (Use Dplyr) Check for and handle missing values. Any clCode beginning with B have been included in error and can be excluded from the analysis Identify any outliers accounts and produce a list of them. Any outlier clCodes can be excluded from the analysis. Plot data and identify trends and/or points of interest. Discuss your findings and prepare explanatory visualisations in an R Markdown (.Rmd) file
Answered Same DayNov 09, 2021

Answer To: Assignment For this assignment, you will use the dataset weights.csv. This is a dataset of...

Naveen answered on Nov 11 2021
147 Votes
---
title: "Two Sample t-test"
output: html_document
---
```{r message=FALSE, warning=FALSE}
# Loading Required packages
library(dplyr)
libr
ary(stringr)
# Reading weights.csv data
weights <- read.csv('weights.csv')
# Showing first Six records
head(weights)
# Printing structure of the data
str(weights)
```
##### summarizing the weights for each clCode by receptType.
```{r warning=FALSE, message=FALSE}
weights <- weights %>%
group_by(clCode, receptType) %>% # Grouping by clCode and receptType
summarise(Min = min(weight), # calculating minimum weights
Median = median(weight), # calculating median of weights
Mean = mean(weight), # calculating mean of weights
Variance = var(weight), # calculating variance of weights
'Standard Deviation' = sd(weight), # calculating Standard deviation of weights
max = max(weight), # calculating maximum weights
Sum = sum(weight),
N = length(weight)) # finding number of weights
weights %>% head() # Printing first SIX records
```
##### Create a new variable for each clCode to identify whether they use receptType = 3 and receptType = 1
```{r}
weights1 <- weights %>%
filter(str_detect(receptType, "^3") | str_detect(receptType, "^1")) %>% # filtering
mutate(New_receptType = receptType) # Creating a new variable
# Showing firsr SIX records
head(weights1)
```
##### Checking missing...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here