# Test whether two means are significantly different?

I have an anonymized database of a fictional bank with approximately 30,000 entries. These database contains for each customer whether he uses online banking (0 = he doesn't, 1 = he does) and the realised profit (in Euros) of the last year.

So I consider this database as a "sample", since the popularity of the bank's customers is higher. Now I calculated the mean of profits of all customers using online banking and the mean of profits of all customers NOT using online banking.

Now I'd like to test whether these two means differ significantly. Which is the right test to go with? I thought of the t-test, but I'm not sure, that these two means can be considered as based on two samples?

• Do you mean that the dataset has 30,000 rows ? What are the summary statistics of the two samples (mean, median, standard deviation) ? – Robert Long May 28 '19 at 8:37
• @XDAF Did my post answer your question? – machine Jun 5 '19 at 6:38

The independent t test is for two $$groups$$. This means you can have one sample that you can divide into groups based on some characteristics like male vs. female or as in your case online banking yes vs. no. If you want to compare the means you maybe rather want to use the Welch t test and not the Student's t test (see here). Also keep in mind that with a big sample size the power of a t test increases, hence, it is easier to get a significant result. So you should also have a look whether the statistically significant difference in means is of any interest to you, because with a big sample size even little not relevant differences can be significant. See this question for some discussion, for example.