Questions tagged [t-test]

Related to statistical hypothesis testing. Most software packages used for statistical analysis (including R) provide functions for performing the t-test. Use this tag for questions related to the t-test.

The t-test is also known as the "Student's t-test" after the pseudonym of its inventor. It is used for comparing the means of two samples, or the mean of one sample (or even parameter estimates) with a specified value. See the Wikipedia article for more details. Refer to the R documentation for details on the t.test function arguments and return values.

494 questions
0
votes
1 answer

printing and storing results of t-test loop

I have a dataset with several independent variables and few dependent variables I'd like to run multiple t-tests with. All my independent are dummies, whereas my dependent vars are numeric. I wrote the following loop: for ind in df[['ind1','ind2',…
Filippo Sebastio
  • 1,112
  • 1
  • 12
  • 23
0
votes
2 answers

R run T-test/anova for each row with 2 groups with 3 samples

My dataset looks something like this: df <- data.frame(compound = c("alanine ", "arginine", "asparagine", "aspartate")) df <- matrix(rnorm(12*4), ncol = 12) colnames(df) <- c("AC-1", "AC-2", "AC-3", "AM-1", "AM-2", "AM-3", "SC-1", "SC-2", "SC-3",…
0
votes
1 answer

R Studio T test

I am working on an assignment in RStudio, examining the difference between car makes and their crash safety ratings. Right now I only want to test b/w Ford and Chevrolet but the "make" category has another 20 makes. To perform a simple T Test using…
0
votes
1 answer

How to import values from a column of csv dataset into python for t-test?

New coder here, trying to run some t-tests in Python 3.6. Right now, to run my t-tests between my 2 data sets, I have been doing the following: import plotly.plotly as py import plotly.graph_objs as go from plotly.tools import FigureFactory as…
braxsch
  • 15
  • 3
0
votes
1 answer

R. Using t-test, compare individual mean with global mean

I have a huge matrix of this form, with 1000000 rows and 10000 columns. This is a toy example: A B C Mean 1 3 4 2.66 2 4 3 3 1 3 4 2.66 9 9 9 9 1 3 2 2 2 4 5 3 1 2 6 3 2 3 5 3.33 The rows in column "Mean" represent the mean of A, B and C for each…
Lucas
  • 1,139
  • 3
  • 11
  • 23
0
votes
0 answers

Running t.tests on "tidy" data in R with multiple conditions

I have a "tidy" dataframe and am trying to run a series of t-tests. The first column includes a series of food names. The next 3 columns include 0 or 1 values that specify the experimental condition. The last column includes the mean of the ratings…
melbez
  • 960
  • 1
  • 13
  • 36
0
votes
1 answer

Obtain the t -statistic for the test that the slopes of the regressions are zero

I have data on birth proportion every year for four different countries. I have fitted this data with four simple regression lines using the code:- mbirthprop <-…
0
votes
0 answers

My T-test argument of syntax is right from my data set? [A beginner of R]

I started R only a bit ago. So I would like to ask you if I am doing t-test right with my purpose. I have two data set like this. > head(da1) LiefertagDeliveryDate Price Hour 1 2015-12-31 28.82 1 25 2015-12-30 42.97 …
S. Jay
  • 141
  • 2
  • 10
0
votes
0 answers

Test for significance of specific multiple groups in R

The data looks as follows: > data <- read.csv("data.csv") > head(data) ï..class.1 rev.1 class.2 rev.2 1 7 136.9900 1318 31.9900 2 1223 24.0984 1001 0.0000 3 1318 61.9900 6851 104.2655 4 1014 39.9800 …
Sharkbait
  • 1
  • 1
0
votes
3 answers

Pandas can't find the relevant file

I'm attempting to try a t-test in python using the pandas module. However, the same error keeps occuring in which my target file cannot be found. In this case, the target file is brain_size.csv, where the separators are semi-colons. The values which…
Maurice1016
  • 3
  • 1
  • 2
0
votes
0 answers

How to conduct a significance test for a grouped variable in R?

I have the following code: df%>%group_by(var1, var2)%>%summarise(mean=mean(var3)) which yields: var1 var2 mean 1 Handtuch INK 3.08 2 Handtuch KON 3.08 3 Kissen INK 3.15 4 …
Jens Stach
  • 39
  • 1
  • 8
0
votes
1 answer

multiple group comparison: anova post hoc test or pairwise.t.test?

There is a fundamental question that I have not been able to fully understand. I have a 5 independent groups and want to know which of these group means are different. So I have two choices: 1. Do one-way anova and then post hoc test (eg. Tukey)…
zesla
  • 11,155
  • 16
  • 82
  • 147
0
votes
0 answers

R: calculate p-value of t-test using qt-function

We are testing if a computer's performance increases after its OS update by comparing the performance of 10 different Programs before and after the update which results in: Program: #1 #2 #3 #4 #5 before: 34 29 32 27 28 after: 32 34 …
JinseiNagai
  • 351
  • 1
  • 2
  • 10
0
votes
1 answer

T.Test across several columns at once?

I'm attempting to do a T-Test across many different columns at once, but can't figure out how to do it. Here is what I have for one of the columns, Clout. t.test(wf[wf$ThreadID == 249001,]$Clout,wf[wf$ThreadID == 230005,]$Clout) But I have about 20…
Sam
  • 6,616
  • 8
  • 35
  • 64
0
votes
1 answer

post hoc for specific pairwise comparisons after welch's anova

I am quite new to R and completely new to this website, so I really hope I am ably to convey my question in a clear way. The following is a part of my data set: A1<-c(0.308, 0.3624, 0.1861, 0.6176, 0.0506, 0.1014, 0.2245, 0.1894, 0.246,…
OCSee
  • 35
  • 8