Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
41 views
in R by (114k points)
How can I perform a t-test in R?

Please log in or register to answer this question.

1 Answer

0 votes
by (114k points)

You can use the t.test() function in R to perform a t-test. 

Here's an example:

# Create example data
group1 <- c(10, 15, 20, 25, 30)
group2 <- c(5, 10, 15, 20, 25)

# Perform a t-test
result <- t.test(group1, group2)

# Print the test result
print(result)
 

Output:

    Welch Two Sample t-test

data:  group1 and group2
t = 0, df = 7.87, p-value = 1
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -6.36  6.36
sample estimates:
mean of x mean of y 
     20       15 

Related questions

0 votes
1 answer
asked Jun 16, 2023 in R by kvdevika (114k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jun 15, 2023 in R by kvdevika (114k points)
0 votes
1 answer

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...