Posts

Showing posts from November, 2023

Final Project: Comparative Analysis of Fuel Efficiency in Various Vehicle Types - LIS 4273

Image
  Final Project: Comparative Analysis of Fuel Efficiency in Various Vehicle Types Step 1: Choosing a Dataset Dataset: Fuel Economy Data from the US Department of Energy ( http://www.fueleconomy.gov/feg/download.shtm )   Step 2: Sampling and Hypothesis Sample Size: 250 vehicles Null Hypothesis (H0): There is no significant difference in fuel efficiency between different vehicle types. Alternative Hypothesis (H1): There is a significant difference in fuel efficiency (MPG/City) between different vehicle types.   Step 3: Write-up Summary This study aims to determine whether different types of vehicles have statistically significant differences in fuel efficiency. Customers place a high value on fuel economy, and knowledge about the capabilities of various car models can help lawmakers and consumers alike. This study is consistent with what was discussed in class on analysis of variance (ANOVA) and hypothesis testing. The groundwork for choosing suitable...

Module #12 Assignment

Module #18 Assignment R's plot() function can be used to show the data. You can plot the values from each year separately or overlay them for comparison because you have data from two years. credit_card_data <- data.frame(   Month = c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"),   Year_2012 = c(31.9, 27, 31.3, 31, 39.4, 40.7, 42.3, 49.5, 45, 50, 50.9, 58.5),   Year_2013 = c(39.4, 36.2, 40.5, 44.6, 46.8, 44.7, 52.2, 54, 48.8, 55.8, 58.7, 63.4) ) plot(credit_card_data$Month, credit_card_data$Year_2012, type = "l", col = "blue", ylim = range(credit_card_data$Year_2012, credit_card_data$Year_2013), xlab = "Month", ylab = "Credit Card Charges", main = "Credit Card Charges Over Time") lines(credit_card_data$Month, credit_card_data$Year_2013, col = "red") legend("t...

Module 11 Assignment

 Module 11 Assignment Question 10.1: Set up an additive model for the ashina data Using the R ISwR package, you can build up an additive model for the ashina data. You can set up the model using the following: library(ISwR) data(ashina) ashina$subject <- factor(1:16) attach(ashina) act <- data.frame(vas = vas.active, subject, treat = 1, period = grp) plac <- data.frame(vas = vas.plac, subject, treat = 0, period = grp) After preparing your data, you can now build up your additive model and evaluate the impact of subjects, periods, and treatments by comparing the outcomes with t-tests. Question 10.3: Generate model matrices for models z ~ a*b, z ~ a:b, etc. The task at hand involves creating model matrices for various models by utilizing the vectors a, b, x, y, and z. It is necessary to conduct out the model fits and talk about the consequences of each model. You can use the following: a <- c(2, 2, 8) b <- c(2, 4, 8) x <- 1:8 y <- c(1:4, 8:5) z <- rnorm(8) mod...