Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Jul 2017 |
Last Sign in: | 270 Weeks Ago, 6 Days Ago |
Questions Answered: | 5502 |
Tutorials Posted: | 5501 |
MBA.Graduate Psychology,PHD in HRM
Strayer,Phoniex,
Feb-1999 - Mar-2006
MBA.Graduate Psychology,PHD in HRM
Strayer,Phoniex,University of California
Feb-1999 - Mar-2006
PR Manager
LSGH LLC
Apr-2003 - Apr-2007
Exercise: Determining the sample size and ANOVA
1) Let us consider the question of how large the sample size should be to obtain an estimate of a population proportion at a specified level of precision.Â
In a survey the planning value for the population proportion p is 0.35.Â
How large a sample should be taken to provide a 95% confidence interval with a margin of error of 0.05 (Click here to see the Formula).
2)Â
A) Use the following data and calculate F-test using ANOVA one-way in excel to show any significant difference between wage and age-groups
B) Is there any significate different between wage of married and non-married population? (use the week-3 code to run a t.test)Â
Note: For the age-group use "agecat" and for wage use the "wage"
This week dataset:Â HMGT400
You can use following codes
*************************************
# Week5-Exercise
# look at the box-plot
boxplot(data$wage ~ data$agecat)
do2.aov <- aov(data$wage ~ data$agecat)
summary (do2.aov)
# use the same analysis for race, you only need to change the agecat with race
*************************************
Â
Exercise#5
data <- read.csv("E:/UMUC/Faculty/2017-HMGT-0109-0305/Data/HMGT400.csv", header=T, sep = ',')
#1: See the variables' names
names (data)
#2: Check the histogram for wage and age
# 2a: histogram of age
hist(data$age)
# 2b: histogram of wage
hist(data$wage)
# 2c: histogram of married
hist(data$married)
# as you can see married is the binary variable
# 2d: histogram of school yrs
hist(data$yrschool)
# Model 1:
model1 <- lm(wage ~ age, data=data)
summary(model1)
# Model 2:
model2 <- lm(wage ~ age +Â married, data=data)
summary(model2)
# Model 3:
model3 <- lm(wage ~ age +Â married + yrschool, data=data)
summary(model3)
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- T-----------han-----------k y-----------ou -----------for----------- us-----------ing----------- ou-----------r w-----------ebs-----------ite----------- an-----------d a-----------cqu-----------isi-----------tio-----------n o-----------f m-----------y p-----------ost-----------ed -----------sol-----------uti-----------on.----------- Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m o-----------nli-----------ne -----------or -----------inb-----------ox -----------me -----------a m-----------ess-----------age----------- I -----------wil-----------l