Posts

Showing posts from October, 2024

Module #9 Assignment

Image
 Module #9 Assignment  1. Your data.frame is > assignment_data <- data.frame( Country = c("France","Spain","Germany","Spain","Germany", "France","Spain","France","Germany","France"), age = c(44,27,30,38,40,35,52,48,45,37), salary = c(6000,5000,7000,4000,8000, 5500 ,   4500 ,   6000 ,   7500 ,   5000 ), Purchased=c("No","Yes","No","No","Yes", "Yes","No","Yes","No","Yes")) Generate simple table in R that consists of four columns: Country, age, salary and purchased.

Module #8 Assignment

Image
Module #8 Assignment Your assignment: A researcher is interested in the effects of drug against stress reaction. She gives a reaction time test to three different groups of subjects: one group that is under a great deal of stress, one group under a moderate amount of stress, and a third group that is under almost no stress. The subjects of the study were instructed to take the drug test during their next stress episode and to report their stress on a scale of 1 to 10 (10 being most pain). High Stress Moderate Stress Low Stress 10 8 4 9 10 6 8 6 6 9 7 4 10 8 2 8 8 2 Report on drug and stress level by using R. Provide a full summary report on the result of ANOVA testing and what does it mean. More specifically, report  using the following R functions:  Df, Sum, Sq Mean, Sq, F value, Pr(>F)   

Module #7 Assignment

Image
 Module #7 Assignment 1. In this assignment's segment, we will use the following regression equation    Y = a + bX +e Where: Y  is the value of the  Dependent variable (Y) , what is being predicted or explained a  or Alpha, a constant; equals the value of Y when the value of X=0 b  or Beta, the coefficient of X; the slope of the regression line; how much Y changes for each one-unit change in X. X  is the value of the Independent variable (X), what is predicting or explaining the value of Y e  is the error term; the error in predicting the value of Y, given the value of X  (it is not displayed in most regression equations). 1.1  The data in this assignment: x <- c ( 16 , 17 , 13 , 18 , 12 , 14 , 19 , 11 , 11 , 10 ) y <- c ( 63 , 81 , 56 , 91 , 47 , 57 , 76 , 72 , 62 , 48 ) 1.1 Define the relationship model between the  predictor  (x) and the  response  (Y) variable: The relationship mode...

Module #6 Assignment

Image
Module #6 Assignment A.  Consider a population consisting of the following values, which represents the number of ice cream purchases during the academic year for each of the five housemates. 8, 14, 16, 10, 11 a. Compute the mean of this population. 8 + 14 + 16 + 10 + 11 = 59/5 = 11.8