Question

In: Statistics and Probability

In r studio, how do you find significant variables that differ between two datasets of the...

In r studio, how do you find significant variables that differ between two datasets of the same variables?

Solutions

Expert Solution

Suppose we have a data set of 10 male student score and 10 female student sore out of 100 in mathematics final exam and we have to check is there significant difference between their average scores.
To check this we use two sample t test assuming equal variance.
Male_Student = c(60,65,64,75,84,81,72,76,70,55)
Female_Student = c(72,76,67,89,81,73,78,60,64,63)
length(Male_Student)
length(Female_Student)
t.test(Male_Student,Female_Student,var.equal=TRUE)

_________________________________________________________________

R - code with output

> Male_Student = c(60,65,64,75,84,81,72,76,70,55)
> Female_Student = c(72,76,67,89,81,73,78,60,64,63)
> length(Male_Student)
[1] 10
> length(Female_Student)
[1] 10
> t.test(Male_Student,Female_Student,var.equal=TRUE)

        Two Sample t-test

data: Male_Student and Female_Student
t = -0.51376, df = 18, p-value = 0.6137
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-10.68755   6.48755
sample estimates:
mean of x mean of y
     70.2      72.3

_____________________________________________________________________

Decision -

Observe that P-value = 0.6137 > alpha = 0.05, Do Not Reject null hypothesis of their is no significant difference between male and female student averages in mathematics subject.

Conclusion - From sample data, there is insufficient evidence to say that there significant difference between male and female average scores in Mathematics.


Related Solutions

In r studio, what is a method to find significant variables within an entire dataset?
In r studio, what is a method to find significant variables within an entire dataset?
how do you test for regression in R studio with variables x and y
how do you test for regression in R studio with variables x and y
How do you plot continuous versus category in r studio
How do you plot continuous versus category in r studio
How do I find the area between the following two polar curves. r = 2cos(theta) r=...
How do I find the area between the following two polar curves. r = 2cos(theta) r= sin(theta) + cos(theta)
Hey anyone good with R studio? How do you create a square shape with R code...
Hey anyone good with R studio? How do you create a square shape with R code by using plot() and lines() please show your code !
1. How do the titration curves differ between nonionizable and ionizable R groups? Why 2.Is the...
1. How do the titration curves differ between nonionizable and ionizable R groups? Why 2.Is the pKa of a Histidine side chain always the same as that of the free amino acid? Why or Why not?3. What is eliminated when two amino acids are combined to form a dipeptide? Biochemistry
How do I do this in R Studio? 1 Students who performed poorly on a City...
How do I do this in R Studio? 1 Students who performed poorly on a City of New York Skills Assessment Test were enrolled in a summer math program. Scores of 10 students before and after the summer program were recorded. They were: Before = 18,18,21,18,18,20,23,23,21,17 After = 24,25,33,29,33,36,34,36,34,27 (Scores for individual students are in the same order in each list.) Did the NYC summer math program improve student performance significantly? 8. How many points did student scores improve on...
How do you find the area between two values under the normal curve?
How do you find the area between two values under the normal curve?
How do you graph integers in r studio. I made new data frames for specific parts...
How do you graph integers in r studio. I made new data frames for specific parts of the data I wanted to use and then got the sum of a column and saved it as a variable under values. My goal is to know how to graph these integer values in a barplot comparing all the values.
How do I input this in R studio 1. Combine the following lists into a matrix...
How do I input this in R studio 1. Combine the following lists into a matrix called animals, where each list becomes a row: Cats = 2,2,4 Dogs = 1,2,1 Cows = 30,35,41 2. Add column names of “Farm A”, Farm B”, and “Farm C”. 3. Transpose the rows and columns in animals and store the result to a matrix called farms. 4. Display the contents of farms.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT