The t-test is commonly used to test the mean difference…