Description
Please help me, I am having some diffuculty understanding this. I am a Straight A student, who is having trouble understanding! Please help me ASAP!!!
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Explanation & Answer
please post the question
Completion Status:
100%
Review
Review
Anonymous
Goes above and beyond expectations!
Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Most Popular Content
Harvard University Health Stats Worksheet
Question 2 What is the crude mortality rate?Age-GroupPopulationNumber of Deaths<3015,0002030-6517,00055>656,000155a. ...
Harvard University Health Stats Worksheet
Question 2 What is the crude mortality rate?Age-GroupPopulationNumber of Deaths<3015,0002030-6517,00055>656,000155a.230b.6.1 per 1,000c.8.6 per 1,000d.6.1 per 10,000Question 3 The age-specific death rate for the over-65 age group isAge-GroupPopulationNumber of Deaths<3015,0002030-6517,00055>656,000155a.155b.25.8 per 1,000c.1.55 per 10,000d.25.8 per 10,000Question 4 Calculate the relative risk of stroke of male smokers to male nonsmokersStrokeSmokersYesNoTotalYes1713,2643,435No1174,3204,437Total2887,5847,872a.1.54b.1.88c.2.08d.None of the above is correctQuestion 5 Calculate the odds ratio of having a stroke in men who smoke to those who do not smokeStrokeSmokersYesNoTotalYes1713,2643,435No1174,3204,437Total2887,5847,872a.1.93b.1.88c.1.78d.1.34Question 6 Is the following interpretation of the odds ratio true or false?The odds of having a stoke are 1.93 times higher in men who smoke than in men who do not smokeStrokeSmokersYesNoTotalYes1713,2643,435No1174,3204,437Total2887,5847,872 True FalseQuestion 7 A new type of test, Generation A, was given to 500 individuals with suspected diabetes, of whom 320 were actually found to have diabetes. The results of the examination are presented in the following table:Generation A ResultDiabetesTest ResultPresentAbsentPositive30050Negative20130Compute the sensitivity and specificity of the findings shown for Test A.a.Sensitivity = 93.7%, Specificity = 72.2%b.Sensitivity = 96.7%, Specificity = 70.2%c.Sensitivity = 95.7%, Specificity = 76.2%d.Sensitivity = 91.7%, Specificity = 78.2%Question 8 A new type of test, Generation A, was given to 500 individuals with suspected diabetes, of whom 320 were actually found to have diabetes. The results of the examination are presented in the following table:Generation A ResultDiabetesTest ResultPresentAbsentPositive30050Negative20130Compute the positive and negative predictive values of the findings shown for the test.a.Positive Predictive value = 82.3% , Negative Predictive Value = 87.5%b.Positive Predictive value = 85.7% , Negative Predictive Value = 86.7%c.Positive Predictive value = 80.1% , Negative Predictive Value = 82.2%d.Positive Predictive value = 77.3% , Negative Predictive Value = 79.3%Question 9 From the following scatter plot, we can say that between y and x there is _______a.Perfect positive correlationb.Virtually no correlationc.Positive correlationd.Negative correlation7 points Question 10 A Director of Human Resources is exploring employee absenteeism at the INCOVA Hospital. A multiple linear regression analysis was performed using the following variables. The results are presented below.VariableDescriptionYnumber of days absent last fiscal yearx1commuting distance (in miles)x2employee's age (in years)x3length of employment at PPP (in years)CoefficientsStandard Errort Statisticp-valueIntercept6.5941463.2730052.0147070.047671x1-0.180190.141949-1.269390.208391x20.2681560.2606431.0288280.307005x3-2.310680.962056-2.401820.018896R=0.498191R2=0.248194Adj R2=0.192089se = 3.553858n = 73What is the regression equation based on this analysis?a.Y = 0.18 x1 + 0.27 x2 –0.51 x3 b.Y = 6.59 – 0.18 x1 + 0.27 x2 c.Y = 6.59 – 0.18 x1 + 0.27 x2 – 2.31x3 d.None of the aboveQuestion 11 A Director of Human Resources is exploring employee absenteeism at the INCOVA Hospital. A multiple linear regression analysis was performed using the following variables. The results are presented below.VariableDescriptionYnumber of days absent last fiscal yearx1commuting distance (in miles)x2employee's age (in years)x3length of employment at PPP (in years)CoefficientsStandard Errort Statisticp-valueIntercept6.5941463.2730052.0147070.047671x1-0.180190.141949-1.269390.208391x20.2681560.2606431.0288280.307005x3-2.310680.962056-2.401820.018896R=0.498191R2=0.248194Adj R2=0.192089se = 3.553858n = 73Which of the following interpretations is correct?a.For every additional year in the employee's age, the average number of absent days in the last year significantly (p-value<0.05) increases by 0.27 days. b.For every additional year in employee’s length of employment, the average number of absent days in the last year significantly (p-value<0.05) decreases by 0.51 days. c.None of the above is correct.6 points Question 12 A Director of Human Resources is exploring employee absenteeism at the INCOVA Hospital. A multiple linear regression analysis was performed using the following variables. The results are presented below.VariableDescriptionYnumber of days absent last fiscal yearx1commuting distance (in miles)x2employee's age (in years)x3length of employment at PPP (in years)CoefficientsStandard Errort Statisticp-valueIntercept6.5941463.2730052.0147070.047671x1-0.180190.141949-1.269390.208391x20.2681560.2606431.0288280.307005x3-2.310680.962056-2.401820.018896R=0.498191R2=0.248194Adj R2=0.192089se = 3.553858n = 73Which of the following statements is correct about the R2?a.The adjusted R2 value is 0.25. This means that the model explains around 25% of the variation in the average number of days absent in the last year. b.The adjusted R2 value is approximately 0.19. This means that the model explains around 19% of the variation in the average number of days absent in the last year. c.The adjusted R2 value is 0.50. This means that the model explains around 50% of the variation in the average number of days absent in the last year. d.None of the above is correct.Question 13 The following graph of a time-series data suggests a _______________ trend.a.linearb.quadraticc.cosined.tangential7 points Question 14 Fitting a linear trend to 36 monthly data points (January 2000 = 1, February 2000 =2, March 2000 = 3, etc.) produced the following tables.CoefficientsStandard Errort Statisticp-valueIntercept222.37967.358243.3014380.002221x9.0090663.174712.837760.00751dfSSMSFp-valueRegression1315319.3315319.38.0528850.007607Residual34133130639156.07Total351646626The projected trend value for January 2003 is ________.a.231.39b.555.71c.339.50d.447.766 points Question 15 Using a three-month moving average, the forecast value for November in the following time series is ____________.July5Aug11Sept13Oct6a.11.60b.10.00c.9.67d.8.606 points Question 16 When forecasting with exponential smoothing, data from previous periods is _________.a.given equal importanceb.given exponentially increasing importancec.ignoredd.given exponentially decreasing importanceQuestion 17A time series with forecast values and error terms is presented in the following table. The mean absolute deviation (MAD) for this forecast is ___________.
Lab homework using R
Lab Homework:#Use the read.table function to load the data from lab8hw.txt and store as object named hw#Submit all plots#1 ...
Lab homework using R
Lab Homework:#Use the read.table function to load the data from lab8hw.txt and store as object named hw#Submit all plots#1.1) Create a scatter plot of iq on y axis and score on X axis. How do the variables appear to be related?#1.2) Conduct a linear regression of iq and score#1.3) Do you reject or fail to reject the null hypothesis about the slope? Why? #1.4) What is the interpretation of the coefficient for the slope in #1.3? #1.5) Calculate the correlation coefficient for iq and score#1.6) Calculate the R-squared from the correlation coefficient. What is the interpretation for this R-squared?#1.7) Add the regression line to the plot created in #1.1#1.8) Based on what you see in #1.7, do you have any concerns about the results? Why or why not? #1.9) Create a dataset hm_iq_score that is a new version of hw but without outliers in iq & score columns. Use the command out. Also, create a regression line for this new data set.#1.10) Plot again the data in 1.1, add the regression lines found in 1.7 and 1.9 (use different colors to plot those lines). Explain why the regression lines look either very similar or very different. -------------------------------------------------------------------------------------------------------------------------Lab lecture notes from class for your reference: #Lab 8-Contents#1. Scatter Plots in R#2. Linear Regression in R#3. Outliers in Regression#4. Hypothesis testing in Regression#5. Correlation and R-Squared in R#6. Outliers Revisited#---------------------------------------------------------------------------------# 1. Scatter Plots in R#--------------------------------------------------------------------------------- #Previously we've looked at various plots in R. #Today we are going to learn how to do a scatter plot in R.#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## Scatter Plot: plot(x=data$variable, y=data$variable)#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##Let's start by reading in the lab8a.txt file. a=read.table('lab8a.txt', header=T)a #The data "a" contains variables named X and Y variables#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##Exercise 1-1: # A) Create a scatter plot for the variables in a. # Put X on the x-axis and Y on the y-axis # B) What does the scatter plot look like? Is it linear?#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# #A) plot(y=a$Y, x=a$X)#B) #Looks kinda linear#---------------------------------------------------------------------------------# 2. Linear Regression in R#--------------------------------------------------------------------------------- #R has a function that computes the regression #of Y on X (Best fit line).#Linear Regression is just the function of y=Mx + b, #there is a slope and intercept.#In Linear Regression, we re-write this function as y=?x + a#??????????????????????????????????????????????????????????????##Thought Question 1: In the equation of y=?x + a, #which is the slope and which is the intercept term. #??????????????????????????????????????????????????????????????##^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## Linear Regression: lm(data$variable ~ data$variable)# lm(outcome/dependent variable ~ predictor/independent variable/determinant)#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##If we wanted to find the best fit line for our data #we could use the linear regression function:lm(a$Y~a$X)#How can we interpret the values we get?#Intercept = -0.3436 #When x is zero, #the mean value of y is -0.3436#Slope = 1.1153 #For a 1 unit increase in x, y increases by 1.1153 points#??????????????????????????????????????????????????????????????##Thought Question 2: How would we interpret the slope if the #coefficent had been negative? eg. -1.1153#??????????????????????????????????????????????????????????????# #---------------------------------------------------------------------------------# 3. Outliers in Regression#--------------------------------------------------------------------------------- #One of the concerns we should have about the data in the # previous section is that there are outliers in the #original data. Let's trim the outliers to see#how this affects our regression lines.#I'll re-plot the dataplot(y=a$Y, x=a$X)#I'm also going to use a new command to identify#the rows where outliers occur.#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## Give Row info for plots: identify(data)#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#identify(a)#On the plot, we can click on the outliers to figure out#what row the outliers occur on #Then they are row 20 and 8#Now, we can close the plot we created #and let's go back and plot our data, #but now by adding the regression line#To add the regression line, #I'll store the results of the linear regression #into an object called m1 (model1)m1=lm(a$Y~a$X)#We can then re-draw the plot plot(y=a$Y, x=a$X)#And use the abline() function to add the regression lineabline(m1)# Now, in order to see the effects of the outliers# I might like to see the regression lines from data #where the outliers have been removed. #I'll create some other versions of the dataset "a"#that does just that.a8=a[-8,] #Does not contain row 8a20=a[-20,] #Does not contain row 20a8_20=a[c(-8,-20),] #Does not contain row 8 and 20#I can then run the regressions on these limited datasets. m2=lm(a8$Y~a8$X)m3=lm(a20$Y~a20$X)m4=lm(a8_20$Y~a8_20$X)#And then plot all the regression lines on the plot.plot(y=a$Y, x=a$X)abline(m1, col="black")abline(m2, col="red")abline(m3, col="green")abline(m4, col="blue")#---------------------------------------------------------------------------------# 4. Hypothesis testing in Regression#---------------------------------------------------------------------------------#In regression, or goal in general is to find out#if two variables are related to each other #This is indicated to us when two variables #do not have a slope of 0.#Then, in regression, our Null and Alternative Hypotheses are:# H0: Beta_1 = 0# HA: Beta_1 different from 0#We can test the null hypothesis here by using #the "summary()" command on our MODELS#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## summary of results: summary(model)#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##Example: If I wanted to know if our original model #without removing outliers had slope of 0#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#summary(m1)#We then compare the p-value to our alpha level#A) If pval < alpha, then Reject the Null Hypothesis#B) If pval > alpha, then Fail to Reject the Null Hypothesis#I fail to reject the null hypothesis of Beta_1 = 0#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##Exercise 4-1: # Test the null hypothesis for the slopes in Models 2, 3, and 4. # Do you reject or fail to reject for each model? #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##A) If pval < alpha, then Reject the Null Hypothesis#B) If pval > alpha, then Fail to Reject the Null Hypothesissummary(m2) #Reject H0 p-value: 0.0141 compare to alpha=.05summary(m3) #Fail to reject H0summary(m4) #Reject H0#---------------------------------------------------------------------------------# 5. Correlation and R-squared in R#--------------------------------------------------------------------------------- #We just learned how to do Linear regression in R #using the lm() function.#Linear regression told us how a 1 unit increase in X#affects Y.#Correlation coefficents (rho) are another way of #representing how strong a linear relationship is.#They range from -1 to 1, with values further away #from zero representing a stronger association. #Positive values indicate that as X increases,#Y increases#Negative values indicate that as X increases, #Y decreases#Below is the function for a correlation between#two variables:#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## Correlation: cor(data$variable1, data$variable2)#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##Exercise 5-1: # Use the correlation function to find the correlation#between X and Y in our datset "a"#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#cor(a$X, a$Y)#Because the correlation is positive we know that # as X increases, Y increases. #We also knew this before when we did linear regression#and looked at the plots. #The correlation coefficent is related to something #from linear regression called R-squared.#R-squared represents the proportion of variability #in the outcome (Y) explained by the predictor (X). #IF we think of our correlation coefficent as R,#then R-squared will be:cor(a$X, a$Y)^2 #This means that ~14.6% of the variability in Y # is explained by the scores in X.#Which is the same value reported in the linear regressionsummary(m1)#---------------------------------------------------------------------------------# 6. Outliers Revisited#---------------------------------------------------------------------------------#For this part, we will need the Rallfun-v23.txt source file#Import the data from lab8b.txt into R in table form; save as object called b.b=read.table('lab8b.txt',header=TRUE)b #Contains 26 values, X variable and Y variable#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##Exercise 6-1: # A) Create a scatter plot (X on x-axis, Y on y-axis)# B) Based on the scatter should the correlation # be positive or negative?#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##A) #B) # Previously we visually identified outliers # and used the identify() command to find their # row numbers so we could eliminate them # Instead, let's use a more systematic approach#using an outlier removal technique called #the Mad-Median#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## Identify Outliers using Mad-Median: out(data$variable)#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## For example, I can identify the outliers in X by doing the following.out(b$X)# n.out tells me how many outliers their are# out.id tells me the rows they occur on.#I could then create a new version of b that does not contain outliers in XbrmX=b[c(-19,-25), ]#And then find the correaltion for this versioncor(brmX$Y, brmX$X)#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##Exercise 6-2: # A) Create dataset brmY that is a new version of b but with outliers in Y removed (using Mad-Median)# B) Create dataset brmXY that is a new version of b but with outliers in X OR Y removed (using Mad-Median).# C) What is the correaltion coefficeint between X and Y for part A# D) What is the correaltion coefficeint between X and Y for part B#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# #A)out(b$Y)brmY=b[c(-22,-26), ]#B)brmXY=b[c(-22,-26,-19,-25),]#C) cor(brmY$Y, brmY$X)#D)cor(brmXY$Y, brmXY$X)#Now, if we look at all these correlation values #removing these various outliers, what do we notice?cor(b$Y, b$X)cor(brmX$Y, brmX$X)cor(brmY$Y, brmY$X)cor(brmXY$Y, brmXY$X)#And now what does our plot look like if we removed outliers in X or Y plot(y=b$Y, x=b$X)points(y=brmXY$Y, x=brmXY$X,col="red")#Are there still outliers? #??????????????????????????????????????????????????????????????##Thought Question 3: What does this tell us about #our outlier detection technique?#??????????????????????????????????????????????????????????????#
9 pages
Descriptive Statistics And Data Visualizations Final
The ultimate objective of the administration in a nursing home is higher patient satisfaction, higher utilization, and low ...
Descriptive Statistics And Data Visualizations Final
The ultimate objective of the administration in a nursing home is higher patient satisfaction, higher utilization, and lower readmission. The purpose ...
9 pages
Business Inventoryoptimization
Dan McClure owns a thriving independent bookstore in artsy New Hope, Pennsylvania. He must decide how many copies to order ...
Business Inventoryoptimization
Dan McClure owns a thriving independent bookstore in artsy New Hope, Pennsylvania. He must decide how many copies to order of a new book, Power and ...
Ashworth College Integers in The Real World Budget Developing Report
Instructions
Integers in the Real World
Connecting Integers to Finances
Imagine that you have graduated and obtained your ...
Ashworth College Integers in The Real World Budget Developing Report
Instructions
Integers in the Real World
Connecting Integers to Finances
Imagine that you have graduated and obtained your ideal job! This project will help you connect what you have learned about integers to personal finances.
In this project, you will:
Learn to describe income using an equation.
Learn to evaluate your income based on given hours per week or a goal amount of money.
Learn to make reasonable conclusions about finances.
Connect the idea of positive and negative integers to credits and debits within accounts.
To complete this project you will:
Complete the Ideal Job Worksheet to guide you in developing your budget. Be sure to show all work!
Complete a 2-page, double-spaced, APA formatted report. In the report, you need to present your findings and explain the connections between your calculations and integers. Thoughts to include in the report include: What types of transactions are positive or negative? How can you write an expression to determine your income? How can you write an equation to solve the number of hours you need to work or the amount of money you need to make to reach your financial goals.
Ideal Job Worksheet
Similar Content
Algebra Question
ABCD is a parallelogram. Angle B is equal to and angle D is equal to Find x. 12.5157.538.75...
How do I solve this integer?
As I move to the right on a number line, what happens to the value of the numbers?What operations move me right on the # l...
1...find probability...round 2 decimal
An investment strategy has an expected return of 21 percent and a standard deviation of 15 percent. Assume investment retu...
MATH HELP!! I will best the best answer fast
...
MTH 156 Harvard School of Business Small Statistics Work on Probabilities Questions
Option 2: Probabilities of Graduation and Publication
Instructions
Professors have hundreds of students in their classes e...
writing linear equations to model the situation
you are designing a calendar as a fundraiser for your mathematics club the cost of is $500,plus 2.50 per calendar .write a...
Math221 Week 4 Lab 06232019
NOTE: For question 1, you will be using the same data file your instructor gave you 1. Using the data file from your instr...
mathematics syllabus
Core Mathematics: Functions and graphs; limit and continuity; applications of derivative and integral. Conics; Polar coord...
Week 2 Assignment Qnt Final
The director of admissions at Kinzua University in Nova Scotia estimated the distribution of student admissions for the fa...
Related Tags
Book Guides
The King Must Die
by Mary Renault
Where'd You Go Bernadette
by Maria Semple
The Age Of Light
by Whitney Scharer
Untamed
by Glennon Doyle
Les Miserables
by Victor Hugo
The Woman in the Window
by A. J. Finn
The Russian Hoax
by Gregg Jarrett
A Passage to India
by E. M. Forster
Unf*ck Yourself
by Gary John Bishop
Get 24/7
Homework help
Our tutors provide high quality explanations & answers.
Post question
Most Popular Content
Harvard University Health Stats Worksheet
Question 2 What is the crude mortality rate?Age-GroupPopulationNumber of Deaths<3015,0002030-6517,00055>656,000155a. ...
Harvard University Health Stats Worksheet
Question 2 What is the crude mortality rate?Age-GroupPopulationNumber of Deaths<3015,0002030-6517,00055>656,000155a.230b.6.1 per 1,000c.8.6 per 1,000d.6.1 per 10,000Question 3 The age-specific death rate for the over-65 age group isAge-GroupPopulationNumber of Deaths<3015,0002030-6517,00055>656,000155a.155b.25.8 per 1,000c.1.55 per 10,000d.25.8 per 10,000Question 4 Calculate the relative risk of stroke of male smokers to male nonsmokersStrokeSmokersYesNoTotalYes1713,2643,435No1174,3204,437Total2887,5847,872a.1.54b.1.88c.2.08d.None of the above is correctQuestion 5 Calculate the odds ratio of having a stroke in men who smoke to those who do not smokeStrokeSmokersYesNoTotalYes1713,2643,435No1174,3204,437Total2887,5847,872a.1.93b.1.88c.1.78d.1.34Question 6 Is the following interpretation of the odds ratio true or false?The odds of having a stoke are 1.93 times higher in men who smoke than in men who do not smokeStrokeSmokersYesNoTotalYes1713,2643,435No1174,3204,437Total2887,5847,872 True FalseQuestion 7 A new type of test, Generation A, was given to 500 individuals with suspected diabetes, of whom 320 were actually found to have diabetes. The results of the examination are presented in the following table:Generation A ResultDiabetesTest ResultPresentAbsentPositive30050Negative20130Compute the sensitivity and specificity of the findings shown for Test A.a.Sensitivity = 93.7%, Specificity = 72.2%b.Sensitivity = 96.7%, Specificity = 70.2%c.Sensitivity = 95.7%, Specificity = 76.2%d.Sensitivity = 91.7%, Specificity = 78.2%Question 8 A new type of test, Generation A, was given to 500 individuals with suspected diabetes, of whom 320 were actually found to have diabetes. The results of the examination are presented in the following table:Generation A ResultDiabetesTest ResultPresentAbsentPositive30050Negative20130Compute the positive and negative predictive values of the findings shown for the test.a.Positive Predictive value = 82.3% , Negative Predictive Value = 87.5%b.Positive Predictive value = 85.7% , Negative Predictive Value = 86.7%c.Positive Predictive value = 80.1% , Negative Predictive Value = 82.2%d.Positive Predictive value = 77.3% , Negative Predictive Value = 79.3%Question 9 From the following scatter plot, we can say that between y and x there is _______a.Perfect positive correlationb.Virtually no correlationc.Positive correlationd.Negative correlation7 points Question 10 A Director of Human Resources is exploring employee absenteeism at the INCOVA Hospital. A multiple linear regression analysis was performed using the following variables. The results are presented below.VariableDescriptionYnumber of days absent last fiscal yearx1commuting distance (in miles)x2employee's age (in years)x3length of employment at PPP (in years)CoefficientsStandard Errort Statisticp-valueIntercept6.5941463.2730052.0147070.047671x1-0.180190.141949-1.269390.208391x20.2681560.2606431.0288280.307005x3-2.310680.962056-2.401820.018896R=0.498191R2=0.248194Adj R2=0.192089se = 3.553858n = 73What is the regression equation based on this analysis?a.Y = 0.18 x1 + 0.27 x2 –0.51 x3 b.Y = 6.59 – 0.18 x1 + 0.27 x2 c.Y = 6.59 – 0.18 x1 + 0.27 x2 – 2.31x3 d.None of the aboveQuestion 11 A Director of Human Resources is exploring employee absenteeism at the INCOVA Hospital. A multiple linear regression analysis was performed using the following variables. The results are presented below.VariableDescriptionYnumber of days absent last fiscal yearx1commuting distance (in miles)x2employee's age (in years)x3length of employment at PPP (in years)CoefficientsStandard Errort Statisticp-valueIntercept6.5941463.2730052.0147070.047671x1-0.180190.141949-1.269390.208391x20.2681560.2606431.0288280.307005x3-2.310680.962056-2.401820.018896R=0.498191R2=0.248194Adj R2=0.192089se = 3.553858n = 73Which of the following interpretations is correct?a.For every additional year in the employee's age, the average number of absent days in the last year significantly (p-value<0.05) increases by 0.27 days. b.For every additional year in employee’s length of employment, the average number of absent days in the last year significantly (p-value<0.05) decreases by 0.51 days. c.None of the above is correct.6 points Question 12 A Director of Human Resources is exploring employee absenteeism at the INCOVA Hospital. A multiple linear regression analysis was performed using the following variables. The results are presented below.VariableDescriptionYnumber of days absent last fiscal yearx1commuting distance (in miles)x2employee's age (in years)x3length of employment at PPP (in years)CoefficientsStandard Errort Statisticp-valueIntercept6.5941463.2730052.0147070.047671x1-0.180190.141949-1.269390.208391x20.2681560.2606431.0288280.307005x3-2.310680.962056-2.401820.018896R=0.498191R2=0.248194Adj R2=0.192089se = 3.553858n = 73Which of the following statements is correct about the R2?a.The adjusted R2 value is 0.25. This means that the model explains around 25% of the variation in the average number of days absent in the last year. b.The adjusted R2 value is approximately 0.19. This means that the model explains around 19% of the variation in the average number of days absent in the last year. c.The adjusted R2 value is 0.50. This means that the model explains around 50% of the variation in the average number of days absent in the last year. d.None of the above is correct.Question 13 The following graph of a time-series data suggests a _______________ trend.a.linearb.quadraticc.cosined.tangential7 points Question 14 Fitting a linear trend to 36 monthly data points (January 2000 = 1, February 2000 =2, March 2000 = 3, etc.) produced the following tables.CoefficientsStandard Errort Statisticp-valueIntercept222.37967.358243.3014380.002221x9.0090663.174712.837760.00751dfSSMSFp-valueRegression1315319.3315319.38.0528850.007607Residual34133130639156.07Total351646626The projected trend value for January 2003 is ________.a.231.39b.555.71c.339.50d.447.766 points Question 15 Using a three-month moving average, the forecast value for November in the following time series is ____________.July5Aug11Sept13Oct6a.11.60b.10.00c.9.67d.8.606 points Question 16 When forecasting with exponential smoothing, data from previous periods is _________.a.given equal importanceb.given exponentially increasing importancec.ignoredd.given exponentially decreasing importanceQuestion 17A time series with forecast values and error terms is presented in the following table. The mean absolute deviation (MAD) for this forecast is ___________.
Lab homework using R
Lab Homework:#Use the read.table function to load the data from lab8hw.txt and store as object named hw#Submit all plots#1 ...
Lab homework using R
Lab Homework:#Use the read.table function to load the data from lab8hw.txt and store as object named hw#Submit all plots#1.1) Create a scatter plot of iq on y axis and score on X axis. How do the variables appear to be related?#1.2) Conduct a linear regression of iq and score#1.3) Do you reject or fail to reject the null hypothesis about the slope? Why? #1.4) What is the interpretation of the coefficient for the slope in #1.3? #1.5) Calculate the correlation coefficient for iq and score#1.6) Calculate the R-squared from the correlation coefficient. What is the interpretation for this R-squared?#1.7) Add the regression line to the plot created in #1.1#1.8) Based on what you see in #1.7, do you have any concerns about the results? Why or why not? #1.9) Create a dataset hm_iq_score that is a new version of hw but without outliers in iq & score columns. Use the command out. Also, create a regression line for this new data set.#1.10) Plot again the data in 1.1, add the regression lines found in 1.7 and 1.9 (use different colors to plot those lines). Explain why the regression lines look either very similar or very different. -------------------------------------------------------------------------------------------------------------------------Lab lecture notes from class for your reference: #Lab 8-Contents#1. Scatter Plots in R#2. Linear Regression in R#3. Outliers in Regression#4. Hypothesis testing in Regression#5. Correlation and R-Squared in R#6. Outliers Revisited#---------------------------------------------------------------------------------# 1. Scatter Plots in R#--------------------------------------------------------------------------------- #Previously we've looked at various plots in R. #Today we are going to learn how to do a scatter plot in R.#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## Scatter Plot: plot(x=data$variable, y=data$variable)#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##Let's start by reading in the lab8a.txt file. a=read.table('lab8a.txt', header=T)a #The data "a" contains variables named X and Y variables#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##Exercise 1-1: # A) Create a scatter plot for the variables in a. # Put X on the x-axis and Y on the y-axis # B) What does the scatter plot look like? Is it linear?#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# #A) plot(y=a$Y, x=a$X)#B) #Looks kinda linear#---------------------------------------------------------------------------------# 2. Linear Regression in R#--------------------------------------------------------------------------------- #R has a function that computes the regression #of Y on X (Best fit line).#Linear Regression is just the function of y=Mx + b, #there is a slope and intercept.#In Linear Regression, we re-write this function as y=?x + a#??????????????????????????????????????????????????????????????##Thought Question 1: In the equation of y=?x + a, #which is the slope and which is the intercept term. #??????????????????????????????????????????????????????????????##^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## Linear Regression: lm(data$variable ~ data$variable)# lm(outcome/dependent variable ~ predictor/independent variable/determinant)#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##If we wanted to find the best fit line for our data #we could use the linear regression function:lm(a$Y~a$X)#How can we interpret the values we get?#Intercept = -0.3436 #When x is zero, #the mean value of y is -0.3436#Slope = 1.1153 #For a 1 unit increase in x, y increases by 1.1153 points#??????????????????????????????????????????????????????????????##Thought Question 2: How would we interpret the slope if the #coefficent had been negative? eg. -1.1153#??????????????????????????????????????????????????????????????# #---------------------------------------------------------------------------------# 3. Outliers in Regression#--------------------------------------------------------------------------------- #One of the concerns we should have about the data in the # previous section is that there are outliers in the #original data. Let's trim the outliers to see#how this affects our regression lines.#I'll re-plot the dataplot(y=a$Y, x=a$X)#I'm also going to use a new command to identify#the rows where outliers occur.#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## Give Row info for plots: identify(data)#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#identify(a)#On the plot, we can click on the outliers to figure out#what row the outliers occur on #Then they are row 20 and 8#Now, we can close the plot we created #and let's go back and plot our data, #but now by adding the regression line#To add the regression line, #I'll store the results of the linear regression #into an object called m1 (model1)m1=lm(a$Y~a$X)#We can then re-draw the plot plot(y=a$Y, x=a$X)#And use the abline() function to add the regression lineabline(m1)# Now, in order to see the effects of the outliers# I might like to see the regression lines from data #where the outliers have been removed. #I'll create some other versions of the dataset "a"#that does just that.a8=a[-8,] #Does not contain row 8a20=a[-20,] #Does not contain row 20a8_20=a[c(-8,-20),] #Does not contain row 8 and 20#I can then run the regressions on these limited datasets. m2=lm(a8$Y~a8$X)m3=lm(a20$Y~a20$X)m4=lm(a8_20$Y~a8_20$X)#And then plot all the regression lines on the plot.plot(y=a$Y, x=a$X)abline(m1, col="black")abline(m2, col="red")abline(m3, col="green")abline(m4, col="blue")#---------------------------------------------------------------------------------# 4. Hypothesis testing in Regression#---------------------------------------------------------------------------------#In regression, or goal in general is to find out#if two variables are related to each other #This is indicated to us when two variables #do not have a slope of 0.#Then, in regression, our Null and Alternative Hypotheses are:# H0: Beta_1 = 0# HA: Beta_1 different from 0#We can test the null hypothesis here by using #the "summary()" command on our MODELS#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## summary of results: summary(model)#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##Example: If I wanted to know if our original model #without removing outliers had slope of 0#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#summary(m1)#We then compare the p-value to our alpha level#A) If pval < alpha, then Reject the Null Hypothesis#B) If pval > alpha, then Fail to Reject the Null Hypothesis#I fail to reject the null hypothesis of Beta_1 = 0#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##Exercise 4-1: # Test the null hypothesis for the slopes in Models 2, 3, and 4. # Do you reject or fail to reject for each model? #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##A) If pval < alpha, then Reject the Null Hypothesis#B) If pval > alpha, then Fail to Reject the Null Hypothesissummary(m2) #Reject H0 p-value: 0.0141 compare to alpha=.05summary(m3) #Fail to reject H0summary(m4) #Reject H0#---------------------------------------------------------------------------------# 5. Correlation and R-squared in R#--------------------------------------------------------------------------------- #We just learned how to do Linear regression in R #using the lm() function.#Linear regression told us how a 1 unit increase in X#affects Y.#Correlation coefficents (rho) are another way of #representing how strong a linear relationship is.#They range from -1 to 1, with values further away #from zero representing a stronger association. #Positive values indicate that as X increases,#Y increases#Negative values indicate that as X increases, #Y decreases#Below is the function for a correlation between#two variables:#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## Correlation: cor(data$variable1, data$variable2)#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##Exercise 5-1: # Use the correlation function to find the correlation#between X and Y in our datset "a"#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#cor(a$X, a$Y)#Because the correlation is positive we know that # as X increases, Y increases. #We also knew this before when we did linear regression#and looked at the plots. #The correlation coefficent is related to something #from linear regression called R-squared.#R-squared represents the proportion of variability #in the outcome (Y) explained by the predictor (X). #IF we think of our correlation coefficent as R,#then R-squared will be:cor(a$X, a$Y)^2 #This means that ~14.6% of the variability in Y # is explained by the scores in X.#Which is the same value reported in the linear regressionsummary(m1)#---------------------------------------------------------------------------------# 6. Outliers Revisited#---------------------------------------------------------------------------------#For this part, we will need the Rallfun-v23.txt source file#Import the data from lab8b.txt into R in table form; save as object called b.b=read.table('lab8b.txt',header=TRUE)b #Contains 26 values, X variable and Y variable#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##Exercise 6-1: # A) Create a scatter plot (X on x-axis, Y on y-axis)# B) Based on the scatter should the correlation # be positive or negative?#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##A) #B) # Previously we visually identified outliers # and used the identify() command to find their # row numbers so we could eliminate them # Instead, let's use a more systematic approach#using an outlier removal technique called #the Mad-Median#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## Identify Outliers using Mad-Median: out(data$variable)#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^## For example, I can identify the outliers in X by doing the following.out(b$X)# n.out tells me how many outliers their are# out.id tells me the rows they occur on.#I could then create a new version of b that does not contain outliers in XbrmX=b[c(-19,-25), ]#And then find the correaltion for this versioncor(brmX$Y, brmX$X)#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*##Exercise 6-2: # A) Create dataset brmY that is a new version of b but with outliers in Y removed (using Mad-Median)# B) Create dataset brmXY that is a new version of b but with outliers in X OR Y removed (using Mad-Median).# C) What is the correaltion coefficeint between X and Y for part A# D) What is the correaltion coefficeint between X and Y for part B#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# #A)out(b$Y)brmY=b[c(-22,-26), ]#B)brmXY=b[c(-22,-26,-19,-25),]#C) cor(brmY$Y, brmY$X)#D)cor(brmXY$Y, brmXY$X)#Now, if we look at all these correlation values #removing these various outliers, what do we notice?cor(b$Y, b$X)cor(brmX$Y, brmX$X)cor(brmY$Y, brmY$X)cor(brmXY$Y, brmXY$X)#And now what does our plot look like if we removed outliers in X or Y plot(y=b$Y, x=b$X)points(y=brmXY$Y, x=brmXY$X,col="red")#Are there still outliers? #??????????????????????????????????????????????????????????????##Thought Question 3: What does this tell us about #our outlier detection technique?#??????????????????????????????????????????????????????????????#
9 pages
Descriptive Statistics And Data Visualizations Final
The ultimate objective of the administration in a nursing home is higher patient satisfaction, higher utilization, and low ...
Descriptive Statistics And Data Visualizations Final
The ultimate objective of the administration in a nursing home is higher patient satisfaction, higher utilization, and lower readmission. The purpose ...
9 pages
Business Inventoryoptimization
Dan McClure owns a thriving independent bookstore in artsy New Hope, Pennsylvania. He must decide how many copies to order ...
Business Inventoryoptimization
Dan McClure owns a thriving independent bookstore in artsy New Hope, Pennsylvania. He must decide how many copies to order of a new book, Power and ...
Ashworth College Integers in The Real World Budget Developing Report
Instructions
Integers in the Real World
Connecting Integers to Finances
Imagine that you have graduated and obtained your ...
Ashworth College Integers in The Real World Budget Developing Report
Instructions
Integers in the Real World
Connecting Integers to Finances
Imagine that you have graduated and obtained your ideal job! This project will help you connect what you have learned about integers to personal finances.
In this project, you will:
Learn to describe income using an equation.
Learn to evaluate your income based on given hours per week or a goal amount of money.
Learn to make reasonable conclusions about finances.
Connect the idea of positive and negative integers to credits and debits within accounts.
To complete this project you will:
Complete the Ideal Job Worksheet to guide you in developing your budget. Be sure to show all work!
Complete a 2-page, double-spaced, APA formatted report. In the report, you need to present your findings and explain the connections between your calculations and integers. Thoughts to include in the report include: What types of transactions are positive or negative? How can you write an expression to determine your income? How can you write an equation to solve the number of hours you need to work or the amount of money you need to make to reach your financial goals.
Ideal Job Worksheet
Earn money selling
your Study Documents