Question

NEED R CODE PLEASE ## Problem 4 *For the `homedata` (**UsingR**) data set find 90% confidence...

NEED R CODE PLEASE ## Problem 4 *For the `homedata` (**UsingR**) data set find 90% confidence intervals for both variables `y1970` and `y2000`, assuming the sample represents some population. Perform one sample t-test for each variable, use `t.test()`, but first discuss whether the model assumptions are appropriate (include some check of the assumptions, like a Q-Q plot).*

0 0
Add a comment Improve this question Transcribed image text
Answer #1
One sample t test assumptions:

The dependent variable must be continuous (interval/ratio)
The observations are independent of one another.

The dependent variable should be approximately normally distributed.

The dependent variable should not contain any outliers.


test code:

t.test(x, mu = mean)

Q-Q plot code :

qqPlot(x,y=NULL,distribution="norm",plot.type="Q-Q")

Add a comment
Know the answer?
Add Answer to:
NEED R CODE PLEASE ## Problem 4 *For the `homedata` (**UsingR**) data set find 90% confidence...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Using R, code the following: The data set `normtemp` (**UsingR**) contains body measurements for 130 healthy,...

    Using R, code the following: The data set `normtemp` (**UsingR**) contains body measurements for 130 healthy, randomly selected individuals. The variable temperature contains normal body temperature data and the variable gender contains gender information, with male coded as 1 and female coded as 2. First, split the data by 'gender'. If the conditions for a two-sample t-test are met then perform the correct t-test to test if the population means (by gender) are equal. Make sure you run the correct...

  • 1. Choose a data set of your own:?Response or dependent variable (Y)?At least 3 or more...

    1. Choose a data set of your own:?Response or dependent variable (Y)?At least 3 or more independent variables (X1, X2, X3, ... etc.) that you believe has an influence on Y.?At least 40 observations or data points?If there are categorical variables, model them appropriately2. Fit a multiple regression model. ?Interpret the model equation?Are all the chosen variables significant? Discuss.?Check for model assumptions and make appropriate comments.?How good is the model? Comment on R2 , R , se, F-value etc and...

  • Solve using R and show R code Instruction: Please submit your R code along with a...

    Solve using R and show R code Instruction: Please submit your R code along with a brief write-up of the solutions. Some of the questions below can be answered with very little or no programming. However, write code that outputs the final answer and dos not ryuira uper calceulatioms. Q.N. 1) The mammals data set in the MASS package records brain size and body size of 62 different mammals a) Fit a regresion model to describe the relation between brain...

  • Please answer all Question 24 1 pts Solve the problem. A 90% confidence interval for the...

    Please answer all Question 24 1 pts Solve the problem. A 90% confidence interval for the average salary of all CEOs in the electronics industry was constructed using the results of a random survey of 45 CEOs. The interval was to make more useful inferences from the data, it is desired to reduce the width of the confidence interval. Which of the following will result in a reduced interval width? O Decrease the sample size and decrease the confidence level....

  • Hypothesis testing regarding the equality of 2 population means: DATA SET: [4 55 73 4 4...

    Hypothesis testing regarding the equality of 2 population means: DATA SET: [4 55 73 4 4 6 4 615 6 6 4 16 8 646 655556 3 78] 1) Take the average of the first three numbers in the first part of your dataset and let's call it 'c'. Test the hypothesis that the difference between 2 population means is equal to 'd'. Choose 5% level of significance and perform the test using critical value approach. Moreover, you have to...

  • Refer to the accompanying data set and construct a 90% confidence interval estimate of the mean...

    Refer to the accompanying data set and construct a 90% confidence interval estimate of the mean pulse rate of adult females then do the same for adult males Compare the results Click the icon to view the pulse rates for adult females and adult males Construct a 90% confidence interval of the mean pulse rate for adult females Pulse Rates - X bpm bpm (Round to one decimal place as needed) Males 85 69 75 65 51 74 57 73...

  • Inference Project - Roll a Die Data (Perform an experiment to obtain data and perform a hypothesi...

    Inference Project - Roll a Die Data (Perform an experiment to obtain data and perform a hypothesis test of your results) 1. For this project you will need to Give an explanation of how you created/obtained your data and who/what it is about. Please be specific about your process. Give the population your sample comes from or if you are compare your sample to a given known value. Give the sample statistic (proportion or mean) of the variable you are...

  • Question 312 marks An study was conducted using data from pedometers of 68 randomly selected part...

    Question 312 marks An study was conducted using data from pedometers of 68 randomly selected participants. The researchers wanted to know if the number of steps taken by a participant (Steps) could be predicted using the time they spent walking (Minutes). The data are available on MyUni in the file Steps.csv. 2 (a) Produce a scatterplot of Steps vs Minutes and describe any relationship between these two variables. (b) Perform a linear regression analysis on this data in MATLAB and...

  • The Book of R (Question 20.2) Please answer using R code. Continue using the survey data...

    The Book of R (Question 20.2) Please answer using R code. Continue using the survey data frame from the package MASS for the next few exercises. The survey data set has a variable named Exer , a factor with k = 3 levels describing the amount of physical exercise time each student gets: none, some, or frequent. Obtain a count of the number of students in each category and produce side-by-side boxplots of student height split by exercise. Assuming independence...

  • Please include all code from R that was used to calculate everything. Problem 2 (0.5 x...

    Please include all code from R that was used to calculate everything. Problem 2 (0.5 x 3 = 1.5 point ) Simulate a sample of y1, ..., 4100 from a simple linear model Y = 1 + 2x + €, where € ~ N(0,62), and x is an arithmetic sequence from 1 to 100, with a step size of 1. Run set.seed(1) to set the seed of R's random number generator so that the simulation can be reproduced. • Make...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT