business statistics

Mahdi.q
Lab-Assignment-Sample.R

# Lab-Assignment-1 sample # Problem-1 Response=c("Strongly disagree", "Disagree", "Agree", "Strongly agree","Don't Know") Percent=c(21.3, 29.2, 25, 13.2, 11.3) # Bar graph barplot(Percent, names.arg = Response, main = "Barplot", xlab = "Response", col = c("Red","Blue","Green", "Yellow", "Pink") ) #PIechart pie(Percent, labels=Response, main = "Pie chart") # Problem-2 problem2=c(850, 900, 1400, 1200, 1050, 1000, 750, 1250, 1050, 565) hist(problem2, main = "Histogram", xlab="Cost") # boxplot boxplot(problem2) # summary statistics summary(problem2) # Standard deviation sd(problem2) # attaching data set in Rstudio attach(Gasoline_usage_1) # histogram hist(`Gasoline Usage`) # bosplot boxplot(`Gasoline Usage`) # summary statistics summary(`Gasoline Usage`) detach(Gasoline_usage_1) # Duncan data attach(Duncan) mean(income) mean(education) median(income) median(education) # variance var(income) var(education) # standard deviation sd(income) sd(education) #boxplot boxplot(income, main="Boxplot") boxplot(education)