T-Test: Analyzing, Applying, and Interpreting Apply the T-Test School of Business, Northcentral

T-Test: Analyzing, Applying, and Interpreting

Apply the T-Test

BUS-7106 v2: Statistics II

January, 2022

Introduction

This paper describes what an independent T test is, how to use it properly, how it was first derived, what each part of the formula represents, the T test’s strengths, weaknesses, limitations, and when to question its results. As per the assignment, two theoretical datasets within Excel and SPSS are analyzed using an independent samples T test examining the differences in level of commitment or emotional attachment to a firm between 250 contracted workers and 250 full-time employees. I describe the purpose of the study, the limitations, and why the T-test was used in the first place, with a narrative describing the overarching themes of the assignment. The next sections highlight how a T-test can be applied to COVID data in SPSS and MATLAB to illustrate this week’s material’s practical application to research. This might not be possible given the assumption within the t-test, but this is tested within this paper.

Independent T-Test Detailed Overview

When a researcher wants to compare the means between two unrelated groups with the same continuous, dependent variable an independent samples t-test (independent t-test), can be performed (). Two examples are, seeing if second-year performance in a graduate program in business varied based upon gender, where the dependent variable is second-year performance and the independent variable is gender with two groups, male, and female (). The second example is there a difference in performance on the GMAT based upon educational level with two groups current undergraduate students those who graduated (). Test performance is the dependent variable and educational level is the independent variable that can be manipulated ().

The independent t-test has several assumptions that must be followed in order to be considered reliable and valid which are:

1.) The dependent variable must take the form of interval or ratio within a continuous scale, like graded test performance, IQ score, or weight.

2.) The IV needs to consist of two categorical, independent groups, known as a binary classification, like gender, employer status, or drinker, yes, or no.

3.) The participants of one group must be 100% independent of the other group with zero overlap.

4.) There cannot be any significant outliers, but in SPSS the software easily shows the outliers and illustrates their effects.

5.) The dependent variable need not be exactly normally distributed, but it needs to be approximately normally distributed.

6.) There must be a homogeneity of variances (). This will be discussed in more detail later in the paper. Suffice to say, for now, within SPSS one can test for the homogeneity of variances via Levene’s test for equality of variances ().

The independent sample t-test is also known as the two sample t-test, or student’s t-test, taking the form of an inferential statistical test where: The null hypothesis takes the form, H0: u1 = u2, where the population means from two unrelated groups equate, and the alternative hypothesis takes the form, HA: u1 ≠ u2 where the two population means from each unrelated group are not equal (). In most cases it is HA being looked for to reject the null hypothesis, and a significance level of alpha is set, and is usually 0.05, but it can be higher or lower based upon a given data structure, sample size, and researcher’s assumptions ().

T-test history and Development

In 1908 an English chemist working for Guinness, William Sealy Gosset developed the t- distribution, a probability distribution of curves, and the t-test under the pseudonym of student ().

While Gosset created the statistical curves and tests to compare the means of two independent batches of alcohol for Guinness, he published his findings in the journal Biometrika under the pseudonym of student as a requirement of his employer at the time (). To put it more precisely the t-distribution are a family of curves that approximate the normal curve but they are a little shorter and fatter due to them being used on smaller sample sizes that do not quite generate a normal bell shaped curve, and when the sample size is >20 the curve is almost exactly the same as a normal curve (). At >=30 sample size the distinguishing features are non-existent or not relevant (). The t distribution is leptokurtic with a kurtosis greater than three, where a normal distribution has a kurtosis of three (). However, there are in some cases, separate calculations for moment of kurtosis versus moment of skewness (), but this is outside the scope of this paper.

High kurtosis indicates heavier tails, meaning more outliers, however, an effective t-test based upon the t-distribution, while having fatter tails than a normal distribution’s sample still tends to be low enough on outliers to be effective if the data is appropriate for a t-test (). Kurtosis is also

referred to as skewness, or level of skewness, where the general formula takes the form: µ4/ σ4 = Kurtosis, or Kurt, for short (). µ4 represents the fourth central moment and σ4 represents the standard deviation (). If kurtosis exceeds the limits allowed for a given data set, and outside the

upper bounds allowed for the t-distribution, and thus, the t-test, then the results would be invalid due toa significant number of outliers (). The full treatment of calculating moment coefficient of skewness or kurtosis, is beyond the scope of this paper, however, a general treatment is included as it relates to the t-test. For skewness checks the general calculation is

2 3 2skewness: g1 = m3 / m 3/2 m = ∑(x−x)3 / n and m = ∑(x−x)̅ 2 / n,

With xbar as the mean, and n the sample size, and m3 the third moment within the data set, with four moments in total which are, the mean, the variance, and standard deviation, skewness, and

kurtosis (). The standard deviation, the square root of the variance is more commonly used because its derivation represents an easy to understand probability along a normal or approximately normal curve with an easily depicted spread (). The formula for the population standard deviation is:

Where sigma is the population standard deviation, N is the population size, xi is the is each value from the population and mu is the population mean (). For the sample standard deviation, the formula is:

A full mathematical treatment of S.D. and the t-test is outside the scope of this paper, but keep in mind under different assumptions of a population or sample, and equal between group variance, or asymmetrical variance, the t-test would be calculated differently and the tails would become either flatter or fatter due to alterations in kurtosis (). In general, unequal variance is not recommended to apply a t-test to, but there are methods to analyze the asymmetrical variance and normalize the results, but there is statistical skepticism to this approach ().

Clarification and Discussion

The reason more advanced topics were touched upon, some in detail and others at a surface level is because what is taught in undergraduate statistics courses and most business graduate statistics courses leave out important information for advanced research, journal submission, and proper quantitative based dissertations. 60%-72% of all research studies suffer

being unable to be replicated or suffer from regression to the mean (). Ivey League and other tier 1 Universities are not immune to these issues (). As a scholar practitioner, PhD student, published researcher, and aspiring University professor, I want to produce the highest quality research with my collaborators as is possible and as an independent researcher as well. I may never teach at Stanford or Harvard, but I want to produce research that gets published in the high impact journals and influences the science of statistics and financial econometrics.

Excel Data T-Test Analysis

Below is the Excel analysis of the assigned data using the independent sample t-test.

First an F test for two groups is performed to see if the variance is equal between each group with the results below:

F-Test Two-Sample for Variances

Variable

1

Variable

2

Mean

0.5

3.71666

7

Variance

0.25423

7

0.66624

3

Observations

60

60

df

59

59

F

0.38159

8

P(F<=f) one-

tail

0.00014

9

F Critical

one-tail

0.64936

9

The variance is not exactly equal, so a two-sample assumed unequal variances is applied. Recall earlier it was stated in this paper that an unequal variance approach is more controversial than an equal variance independent sample t-test. This is not a mainstream view but a controversy between statisticians and mathematicians, and the simple explanation is the assumptions within pooling usually work fine and unequal variance can sometimes unnecessarily skew results, but unequal variance measures can avoid making untrue assumptions about data with wide variance differences. Having said that, for the purposes of this course an F test was used to test for unequal variance and then the ‘appropriate’ t-test was applied for this assignment.

Here is the result of the t-test assuming unequal variance:

t-Test: Two-Sample Assuming Unequal Variances

Variable

1

Variable

2

Mean

0.5

3.71666

7

Variance

0.25423

7

0.66624

3

Observations

60

60

Hypothesized Mean

Difference

0

df

98

t Stat

-25.9701

P(T<=t) one-tail

4.98E-46

t Critical one-tail

1.66055

1

P(T<=t) two-tail

9.97E-46

t Critical two-tail

1.98446

7

Here is the t-test assuming equal variance:

t-Test: Two-Sample Assuming Equal Variances

Variable

1

Variable

2

Mean

0.5

3.71666

7

Variance

0.25423

7

0.66624

3

Observations

60

60

Pooled Variance

0.46024

Hypothesized Mean

Difference

0

df

118

t Stat

-25.9701

P(T<=t) one-tail

6.31E-51

t Critical one-tail

1.65787

P(T<=t) two-tail

1.26E-50

t Critical two-tail

1.98027

2

The output is almost identical with the main difference of there being a pooled variance which when applying stochastic calculus makes more sense than not having a pooled variance, and while outside the scope of this paper, I take the minority view that the equal variance assumption can be more detailed and robust than unequal variance assumption; to be safe I would always apply both methods to the data. Just to anticipate future assignments, an ANOVA is just a modified F test to compare three or more between group means which is more accurate than multiple t-tests since it controls for a Type I error more robustly ().

SPSS DATA Analysis

Below is the SPSS analysis of the assigned data using the independent sample t-test.

Group Statistics

Full or part time N

Mean

Std. Deviation

Std. Error

Mean

Level of commitment to

the firm

Part-time employee

30

3.7583

.81071

.14802

2.00

0a

.

.

.

a. t cannot be computed because at least one of the groups is empty. At the first attempt here is the incomplete analysis:

For a paired samples T test here are the results:

Paired Samples Statistics

Mean

N

Std. Deviation

Std. Error

Mean

Pair 1

Full or part time

.5000

60

.50422

.06509

Level of commitment to

the firm

3.7167

60

.81624

.10538

Paired Samples Statistics

Pair 1 Full or part time & Level of commitment to the firm

60

.051

N Correlation

Paired Samples Test

95% Confidence Interval of th

Difference

Lower

UpperPaired Differences

Mean

Std. Deviation

Std. Error Mean

Pair 1 Full or part time – Level of

commitment to the firm

-3.21667

.93707

.12098

-3.45874

-2.97459

For an ANOVA we see:

ANOVA

Level of commitment to the firm

Sum of

Squares

df

Mean Square

F

Sig.

Between Groups

.104

1

.104

.154

.696

Within Groups

39.204

58

.676

Total

39.308

59

Finally, applying Levene’s test in SPSS, we see:

Test of Homogeneity of Variances

Levene

Statistic

df1

df2

Sig.

Level of commitment to the firm

Based on Mean

.582

1

58

.449

Based on Median

.133

1

58

.716

Based on Median and

.133

1

57.991

.716

Based on trimmed mean

.601

1

58

.442

Variances are close to equal, and none of the P values get to or below 0.05. Thus we do not reject the null hypothesis, and the variances are not significantly different, which resembles the conclusion within Excel using assuming equal variance with a pooled variance and the results from an one-way ANOVA (). Job status is not a significant contributor to level of job commitment overall, but there are subtle seemingly random differences. If one were inclined to apply principles components analysis and partition functions there could possibly be relevant differences, but on a small scale within latent variables.

SPSS Analysis of COVID Data T-Test

MATLAB Data of COVID Data T-Test 