Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Here are the steps to do a one-sample t-test using data in Excel and MATLAB. Excel does not provide this option.

  1. Copy the data from a row or column in Excel

  2. Paste into a variable in MATLAB:

    1. Go to the Command Window

    2. Type “>> y = [“

    3. Paste

    4. Type “]”

    5. Hit Enter; you’ve now created a variable “y” in MATLAB

  3. RRun the ttest function in MATLAB:

>> [h,p] = ttest(y)

p returns the p-value, and h is 1 (p<0.05) or 0.

See MATLAB’s help on ttest.

  • No labels