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

How to represent the binary t-statistic?

The question is given like this: Read the file diabetes.csv. There are two variables called BMI and Outcome. The variable Outcome takes on only two values: 0 and 1. Conduct a non-parametric two sample test for the hypothesis that the standard…
SeanZ
  • 17
  • 5
0
votes
0 answers

Error message on t-test in R

I get the following error message when I try to run a t-test in R: t.test(tsEN$trans.size, tsNEN$trans.size, mu=0, var.equal = TRUE) Error in if (stderr < 10 * .Machine$double.eps * max(abs(mx), abs(my))) stop("data are essentially constant") :…
M M R
  • 1
  • 1
0
votes
2 answers

Perform Student's t-test between data.frames contained in two lists

I have got two separate lists which contain 4 data.frames each one. I need to perform a Student's t-test (t.test) for rainfall between each data.frames within the two lists. Here the lists: lst1 = list(data.frame(rnorm(20), rnorm(20)),…
aaaaa
  • 149
  • 2
  • 18
  • 44
0
votes
0 answers

Perform t-test on the coefficients coming from two different models with different independent variables

I want to check whether a substitution effect among two variables exists. In the models that I have estimated these have been set as independent variables. Each model has 1 "main" dependent variable and a series of control ones. I want to perform a…
minigui
  • 11
  • 1
0
votes
1 answer

How to do multiple t.test() at once

I got two datasets. Each dataset got lots of columns of the same species, sampled at two different occasions. Now I want to see if the mean value of the species is significantly different of each other. I learned that I have to do a paired t-test…
metazoa
  • 55
  • 1
  • 1
  • 9
0
votes
0 answers

t.test error using ddply; count matches yet says not many observations

DON'T MARK DUPLICATE IF YOU CAN'T SPECIFICALLY ANSWER THIS QUESTION and I am not using lapply nor does the question match with this size income.gap count1 count2 1 1000000 656 656 2 1000000 1443 1443 3 1000000 1232 1232 …
0
votes
1 answer

T tests in R- unable to run together

I have an airline dataset from stat computing which I am trying to analyse. There are variables DepTime and ArrDelay (Departure Time and Arrival Delay). I am trying to analyse how Arrival Delay is varying with certain chunks of departure time. My…
Anu
  • 9
  • 4
0
votes
1 answer

sas: when category variable has more than three levels, can I just select two levels data to run two sample t-test

As the title, I have a category variable including A,B,C three levels. I want to just select two levels such as A and B, as I know C is none of the business to run two sample t-test. proc ttest data=ABC plots(shownull)=interval; class…
Zed Fang
  • 823
  • 2
  • 13
  • 24
0
votes
3 answers

paired t-test with pairs and groups defined in another dataframe

I have a dataframe which looks like this > head(data) LH3003 LH3004 LH3005 LH3006 LH3007 LH3008 LH3009 LH3010 LH3011 cg18478105 0.02329879 0.08103364 0.01611778 0.01691191 0.01886975 0.01885553…
LHey
  • 31
  • 1
  • 3
-1
votes
1 answer

Hypothesis testing for three groups

Based on the data, is the average sale amount statistically the same for the A, B, and C groups? I performed t.test on AB, BC, CA. for CA, p-value>0.05, so I concluded for CA, we can't reject null hypothesis, and average may be same. H1- alternative…
anjali
  • 9
  • 2
-1
votes
2 answers

R function to find difference in mean greater than or equal to a specific number

I have just started my basic statistic course using R and we're studying using R for paired t-tests. I have come across questions where we're given two sets of data and we're asked to find whether the difference in mean is equal to 0 or greater than…
-1
votes
1 answer

How could I compress the character values in a column down into 2 in r?

I am working with a table that contains various values taken from high school seniors by an online questionnaire. One of the questions is what one's favorite beverage is. I would like to compare a favorite drink along with how many hours of sleep…
LA Riddle
  • 1
  • 1
-1
votes
1 answer

I get error "incorrect number of subscripts on matrix"

I am trying to perform a paired permutation t-test. I get an error " in t.star[r, ] <- res[[r]] : incorrect number of subscripts on matrix". Below is the code I wrote. Any pointers…
user1174152
  • 47
  • 1
  • 7
-1
votes
1 answer

How to perform a one-sample t-test for each row in just one column in R?

In my dataset I have 14 columnes and originally 48 rows. I reduced row size to 2, because working on problems on R is much easier for me, like this. The first column consists of a participants number, the 14th column is an already aggregated mean…
-1
votes
3 answers

T-test for multiple rows in R

I have a table with 40+ columns and 200.000+ rows. Something like this: ID GROUP-A1 GROUP-A2 GROUP A3...A20 GROUP-B1 GROUP-B2 GROUP-B3...B20 1 5 6 3 5....3 10 21 9 15 2 3 4 6 2....13 …
FKM
  • 31
  • 2
  • 4
1 2 3
32
33