Question

In: Statistics and Probability

APPLIED STATISTICS 2 USE R CODE! SHOW R CODE Use data file RecordMath2526.txt, to produce a...

APPLIED STATISTICS 2

USE R CODE! SHOW R CODE

Use data file RecordMath2526.txt, to produce a plot graph with Exam1 as x, Exam2 as y, use Gender as color, and Hw1 as pch.

RecordMath2526 information

Index Gender Hw1        Hw2     Hw3     Exam1   Hw4     Exam2   Hw5     Hw6     Hw7     Final
1       F      9        6       8       60      7       82      10      10      9       69
2       M     10        10      10      94      9       98      10      10      8       91
3       M      9        10      8       79      9       55      10      6       8       43
4       F     10        9       9       91      8       88      10      9       8       84
5       F      9        8       9       71      9       97      10      9       9       89
6       F      9        9       7       64      9       87      10      9       9       58
7       M      9        9       9       55      7       59      10      6       0       68
8       M      9        10      7       71      10      70      10      8       10      59
9       M      8        10      9       81      10      100     10      10      9       98
10      F      9        9       7       76      6       58      10      5       8       50
11      F     10        6       7       69      5       55      10      4       8       47
12      F      9        5       4       46      7       72      10      6       7       78
13      M      9        9       10      71      9       85      10      8       7       67
14      M      8        9       8       60      10      71      10      8       10      75
15      M      10       9       10      71      10      93      10      9       9       67
16      F      9        10      8       70      7       80      10      10      8       83
17      F      9        10      9       72      7       89      10      9       9       78
18      M     10        10      10      80      10      94      10      9       10      71
19      F     10        10      9       66      9       78      10      6       8       83
20      F      8        9       7       78      6       81      9       7       8       84      

APPLIED STATISTICS 2

USE R CODE! SHOW R CODE

Solutions

Expert Solution

The R-code is

#First we need to copy data and save in text file and after ruin this command choose the text file saved

d=read.table(file.choose(),header=T)
d
attach(d)
plot(Exam1,Exam2,col=Gender,pch=Hw1)

# If You want to add legend

plot(Exam1,Exam2,col=Gender,pch=Hw1)
legend("topleft",legend=levels(Gender),col=Gender,pch=Hw1)

The Output of the R-code is

> d=read.table(file.choose(),header=T)
> d
Index Gender Hw1 Hw2 Hw3 Exam1 Hw4 Exam2 Hw5 Hw6 Hw7 Final
1 1 F 9 6 8 60 7 82 10 10 9 69
2 2 M 10 10 10 94 9 98 10 10 8 91
3 3 M 9 10 8 79 9 55 10 6 8 43
4 4 F 10 9 9 91 8 88 10 9 8 84
5 5 F 9 8 9 71 9 97 10 9 9 89
6 6 F 9 9 7 64 9 87 10 9 9 58
7 7 M 9 9 9 55 7 59 10 6 0 68
8 8 M 9 10 7 71 10 70 10 8 10 59
9 9 M 8 10 9 81 10 100 10 10 9 98
10 10 F 9 9 7 76 6 58 10 5 8 50
11 11 F 10 6 7 69 5 55 10 4 8 47
12 12 F 9 5 4 46 7 72 10 6 7 78
13 13 M 9 9 10 71 9 85 10 8 7 67
14 14 M 8 9 8 60 10 71 10 8 10 75
15 15 M 10 9 10 71 10 93 10 9 9 67
16 16 F 9 10 8 70 7 80 10 10 8 83
17 17 F 9 10 9 72 7 89 10 9 9 78
18 18 M 10 10 10 80 10 94 10 9 10 71
19 19 F 10 10 9 66 9 78 10 6 8 83
20 20 F 8 9 7 78 6 81 9 7 8 84
> attach(d)

> plot(Exam1,Exam2,col=Gender,pch=Hw1)


> plot(Exam1,Exam2,col=Gender,pch=Hw1)
> legend("topleft",legend=levels(Gender),col=Gender,pch=Hw1)



Related Solutions

USE R, SHOW R CODE AND OUTPUT APPLIED STATISTICS 2 Are Angry People More Likely to...
USE R, SHOW R CODE AND OUTPUT APPLIED STATISTICS 2 Are Angry People More Likely to have Heart Disease’? People who get angry easily tend to be more likely to have heart disease. That is the conclusion of a study that followed a random sample of 12,986 people from three locations over about four years. All subjects were free of heart disease at the beginning of the study. The subjects took the Spielberger Trait Anger Scale, which measures how prone...
USE R CODE AND SHOW OUTPUT APPLIED STATISTICS 2 Traditionally, the policy for students’ course grade,...
USE R CODE AND SHOW OUTPUT APPLIED STATISTICS 2 Traditionally, the policy for students’ course grade, >=90, A; between 80 to 89, B, between 70 to 79, C; between 60-69, D; and F, if <60. Now, suppose we use a new grade policy. We just to separate all students into four parts, with the first parts assigning grade A, second parts assigning grade B, then, C, then D (no F). We use the data RecordMath2526.txt to have a try for...
APPLIED STATISTICS 2 PLEASE USE R, SHOW R CODE AND OUTPUT, with conclusion Let x<-c(1,2,3,4,5,6,7,8), y<-c(4,6,3,7,8,3,9,...
APPLIED STATISTICS 2 PLEASE USE R, SHOW R CODE AND OUTPUT, with conclusion Let x<-c(1,2,3,4,5,6,7,8), y<-c(4,6,3,7,8,3,9, 6.5). By vector operation (other method will get 0 point), find a). the equation of regression line, that is, find a, b. b). Find SSR, SSE c). Find F-value d). Find p-value e). Make your decision, that is, answer the question, can we say y and x have linear relationship at alpha=0.05?.
Please use R to solve part e and f The data file data2.txt gives a data...
Please use R to solve part e and f The data file data2.txt gives a data set with two variables x and y. The first column in the data set is just row numbers not useful for this question. (e) Use the Shapiro-Wilks test to test for Normality of the data. State your null and alternative hypotheses, p-value and conclusion. Use α = 0.05 (f) Apply the transformation y 0 = log(y) and run the regression on y 0 on...
I would need both SAS & R code, the output and .txt file/s, please. Because many...
I would need both SAS & R code, the output and .txt file/s, please. Because many HMOs either do not cover mental health costs or provide only minimal coverage, min- isters and priests often need to provide counseling to persons suffering from mental illness. An in- terdenominational organization wanted to determine whether the clerics from different religions have different levels of awareness with respect to the causes of mental illness. Fifteen clerics from different Christian denominations were sampled. Each was...
Write a python program: There is a file called file 2. File2 is a txt file...
Write a python program: There is a file called file 2. File2 is a txt file and I have written the contents of file 2 below in the exact format it was in notepad. # This comment does not make sense # It is just to make it harder # The job description starts after this comment, notice that it has 4 lines. # This job description has 700150 hay system points\\ the incumbent will administer the spending of kindergarden...
Data Analysis & Visualization Topic R vector and save the r code in a text file...
Data Analysis & Visualization Topic R vector and save the r code in a text file Problem 1. Create two vectors named v and w with the following contents:      v : 21,10,32,2,-3,4,5,6,7,4,-22      w : -18,72,11,-9,10,2,34,-5,18,9,2 A) Print the length of the vectors B) Print all elements of the vectors C) Print elements at indices 3 through 7. D) Print the sum of the elements in each vector. E) Find the mean of each vector. (Use R's mean() function)...
Using R to show how classification and clustering, can be applied to classify or cluster data....
Using R to show how classification and clustering, can be applied to classify or cluster data. Make sure to submit your data, results, plots, and your interpretation. a) Please use any dataset to conduct a classification analysis (logistic regression, random forest, or decision tree – better if you apply more than one method and compare) b) Please use any dataset to conduct a clustering analysis (kmeans or hierarchical or random forest – better if you apply more than one method...
pl use R code to do that and show me the program Use a linear regression...
pl use R code to do that and show me the program Use a linear regression of Y~log(X) using the labtestdata.csv data to predict Y (2dp) when x = 250 on the unlogged scale? Calculate the F-value (1 dp) from an ANOVA on the regression of Y~log(X) using the data contained in labtestdata.csv abtestdata.csv y x 1.018746 1 1.508895 2 0.727282 3 1.787127 4 2.903983 5 3.181554 6 1.737834 7 2.715766 8 1.570552 9 3.046107 10 4.499675 11 4.240688 12...
SOLVE THE FOLLOWING USING STATISTICAL SOFTWARE R. SHOW YOUR CODE AND ANSWERS, USING AN RMD FILE...
SOLVE THE FOLLOWING USING STATISTICAL SOFTWARE R. SHOW YOUR CODE AND ANSWERS, USING AN RMD FILE (SHOW ANSWERS IN R MARKDOWN FORWAT WITH CODE AND ANSWERS) PROBLEM 1 A study of 400 glaucoma patients yields a sample mean of 140 mm and a sample standard deviation of 25 mm for the the following summaries for the systolic blood pressure readings. Construct the 95% and 99% confidence intervals for μ, the population average systolic blood pressure for glaucoma patients. PROBLEM 2...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT