Professional Documents
Culture Documents
Automobile Chegg
Automobile Chegg
Example: The null hypothesis might be that there is no difference in the mean
age across different vehicle types.
# Input data
data <- read.table(text = "
Vehicle_Driven Type Satisfaction_with_Vehicle Gender Age
#_of_hours_per_week_in_vehicle Miles_driven_per_week
Number_of_Children Average_number_of_riders
Miles_from_work
Truck Domestic Yes Male 31 10 450 0
1 30
Truck Domestic Yes Male 29 5 370 1
1 22
# ... (data for all 50 individuals)
Car Foreign No Female 19 5 500 0 2
4
", header = TRUE, stringsAsFactors = FALSE)
# Note: The code snippets for 1b, 1c, 1d are placeholders. You need
to replace them with appropriate tests and models based on the nature
of your data and hypotheses.
.
Below is a more comprehensive R code that includes reading data from a file,
performing descriptive statistics, conducting hypothesis tests, and providing
recommendations for the ad campaign:
# Load required libraries
library(tidyverse)
# Read data from a CSV file (replace 'your_data.csv' with the actual
file name)
data <- read.csv("your_data.csv", header = TRUE)
# Note: The code snippets for 1b, 1c, 1d are placeholders. You need
to replace them with appropriate tests and models based on the nature
of your data and hypotheses.
Make sure to replace "your_data.csv" with the actual file path or name of
your data file. Additionally, customize the hypothesis tests and models based
on your specific research questions and data characteristics.