Running a t-test or a z-test to compare the mean of a sample to a value in XLSTAT

Dataset for One sample t and z tests XLS62.5 KB

Tutorial video
One sample t and z tests is part of: Download Trial version More details See users' feedback
  • Pro Core statistical software

  • System configuration

    • Windows:
      • Versions: 9x/Me/NT/2000/XP/Vista/Win 7
      • Excel: 97 and later
      • Processor: 32 or 64 bits
      • Hard disk: 150 Mb
    • Mac OS X:
      • OS: OS X
      • Excel: X, 2004 and 2011
      • Hard disk: 150Mb.

Benefits

  • Easy and user-friendly
    Easy and user-friendly XLSTAT is flawlessly integrated with Microsoft Excel which is the most popular spreadsheet worldwide. This integration makes it one of the simplest available tools to work with as it utilizes the same philosophy as Microsoft Excel. The program is accessible in a dedicated XLSTAT tab. The analyses are grouped into functional menus. The dialog boxes are user-friendly and setting up an analysis is straightforward.
  • Data and results shared seamlessly
    Data and results shared seamlessly One of the greatest advantages of XLSTAT is the way you can share data and results seamlessly. As the results are stored in Microsoft Excel, anyone can access them. There is no need for the receiver to have an XLSTAT license or any additional viewer which makes your team-work easier and more affordable. In addition, results are easily integrable into other Microsoft Office software such as PowerPoint, so that you can create striking presentation in minutes.
  • Modular
    Modular XLSTAT is a modular product. XLSTAT-Pro is a core statistical module of XLSTAT which includes all the mainstream functionalities in statistics and multivariate analysis. More advanced features contained in add-on modules can be added for specific applications. This way you can adapt the software to your needs making the software more cost-efficient.
  • Didactic
    Didactic The results of XLSTAT are organized by analysis and are easy to navigate. Moreover useful information is provided along with the results to assist you in your interpretation.
  • Affordable
    Affordable XLSTAT is a complete and modular analytical solution that can suit any analytical business needs. It is very reasonably priced so that the return of your investment is almost immediate. Any XLSTAT license comes with top level support and assistance.
  • Accessible - Available in many languages
    Accessible - Available in many languages We have ensured XLSTAT is accessible to everyone by making the program available in many languages, including Chinese, English, French, German, Italian, Japanese, Polish, Portuguese and Spanish.
  • Automatable and customizable
    Automatable and customizable Most of the statistical functions available in XLSTAT can be called directly from the Visual Basic window of Microsoft Excel. They can be modified and integrated to more code to fit to the specificity of your domain. Adding tables and plots as well as modifying existing outputs becomes easy. Furthermore, XLSTAT includes some special tools on the dialog boxes to generate automatically the VBA code in order to reproduce your analysis using the VBA editor or to simply load pre-set settings. This effortless automation of routine analysis will be a huge time saver on your part.

Dataset to perform a mean comparison test - either a Student's t-test or a z-test

An Excel sheet containing both the data and the results for use in this tutorial can be downloaded by clicking here. The data correspond to the mathematic grade average for the first semester of a class of 33 students.

Goal 1 of this tutorial

We want to compare the results of those students with the county average which is 11.5. We don’t have the information about the variance of this statistic so we cannot run a z-test. We will then run a t-test.

Some descriptive statistics on the class performance have been computed and can be found on the sheet Desc.

As you can see the average is 11.121.

We can use a t-test to determine if the difference between the average of the class and the average of all students in the county are similar or different with a risk of 5%.

Setting up a Student's t-test for comparing the mean of a sample to a value

Go over to the menu Parametric tests and select the option One-sample t-test and z-test.

data analysis software

In the dialog box, select the data. Press the Range selector and select the column B that contains the “Math average”. The data format is One sample per column. Here we have only one column corresponding to one sample to test. If the data were spanned on several columns for the same sample we could use the other option.

The results will be displayed in a new sheet as we keep the default option Sheet.

The name of the column was included in our data selection so we tick the option Column labels.

Finally you have to decide if you want to run a t-test or a z-test. As explained above we don’t have the information about the standard deviation of the population so we have to run a Student’s t test.

stats software

We can move on to the tab Options to specify our analysis. The first thing to select is the alternative hypothesis. We know that the average of the class is inferior to the general average so we can select the option Mean 1 < Theoretical mean to run a one-sided test which is more accurate than a two-sided test.

Then we enter 11.5 in the Theoretical mean field. The default significance level is 5%. We will use this value.

t-test software

In the Missing data tab we can choose any option as we do not have missing data in this dataset. For the last section Outputs we select the only available option Descriptive statistics.

statistical software

When everything is set, press OK.

Results of the Student's t-test to compare the mean of a sample to a value

The results of the t-test appear in a new sheet. The following table shows that the class of student is performing significantly less good than the average of the county.

statistical software

Goal 2 of this tutorial

To go further we can now use the standard deviation for the math grades for the county. Let’s use 0.55. So the variance is 0.3025.

Setting up a z-test for the comparison of the mean of a sample to a value

In the first tab General, this time instead of the Student’s t-test option choose the option z-test.

statistical software

In the Options tab, you need to set the variance for the z-test. Opt for the option User defined and set the value to 0.3025.

statistical software

Click OK.

Results and interpretation of a z-test for the comparison of the mean of a sample to a value

In the results page you now have that the hypothesis H0 should be rejected and that the students performed significantly worse than the students of the county.

statistical software

The following video shows how to run a Student's t-test and a z-test in XLSTAT.