Lab Assignment_3 solution

xlsx

School

University of Alberta *

*We aren’t endorsed by this school

Course

501

Subject

Statistics

Date

Jan 9, 2024

Type

xlsx

Pages

8

Uploaded by AgentBoulder11782

Report
MGTSC 501 HW3 Answers Name Student ID LAB COMPONENT Copy the R code that you used to answer Q1 a) Number of observations 2867 b) Number of variables 32 Q2 a) Bigregion name South b) Bigregion percentage 36.7 c) Missing value? No Explanation No additional NA+/- column in frequency t d) Copy your chart below. Increase the row height as needed. Q3 a) Copy your histogram below. Increase the row height as needed. Distribution of my_data$bigregion Frequency 0 200 400 600 800 1000 1052 100 200 300 count Distribution of age 20 30 40 50 Median of age Median of ages by bigregion
b) Select the option iii. Between 50 to 75 c) P_value 2.20E-16 Interpretation Reject null. Age does not follow a normal d Bigregion Median of age Q4 Northeast 51 Midwest 50 South 50 West 47 Q5 Copy your bar chart below. Increase the row height as needed. 0 10 20 30 40 50 Northeast Midwest South West Median of age Median of ages by bigregion
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
the questions in the "R" worksheet. table South 1052
distribution
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Copy the R code that you used to answer the library(socviz) my_data <- gss_sm library(epiDisplay) tab1(my_data$bigregion, sort.group = "increasing") library(ggplot2) ggplot(my_data, mapping = aes(x=age)) + geom_histogram(binwidth = 5, fill = "green", color = "black") + labs(title = "Distribution of age") library(nortest) ad.test(my_data$age) library(dplyr) summary_stats <- my_data %>% group_by(bigregion) %>% summarize( Median = median(age, na.rm = TRUE)) print(summary_stats) ggplot(data = summary_stats, mapping = aes(x = bigregion, y = Median))+ geom_col()+ labs(title = "Median of ages by bigregion", y = "Median of age", x ="")
questions here (to cell A2):