Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Data Analysis with STATA

You're reading from   Data Analysis with STATA Explore the big data field and learn how to perform data analytics and predictive modelling in STATA

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher Packt
ISBN-13 9781782173175
Length 176 pages
Edition 1st Edition
Arrow right icon
Toc

Table of Contents (11) Chapters Close

Preface 1. Introduction to Stata and Data Analytics FREE CHAPTER 2. Stata Programming and Data Management 3. Data Visualization 4. Important Statistical Tests in Stata 5. Linear Regression in Stata 6. Logistic Regression in Stata 7. Survey Analysis in Stata 8. Time Series Analysis in Stata 9. Survival Analysis in Stata Index

T tests

Let's start with t tests. A sample t test gives you a leverage point to check whether the sample mean that can have a normally distributed variable has a significant difference from the hypothesis value. For example, you need to test whether the fridge sales average is significantly different from 10000. Here is the command to run the t test:

ttest fridge_sales = 10000

This command checks whether the mean or average of fridge_sales differs significantly from 10000. Here is the exact formula for a sample t test:

T tests

Here are the results of One-sample t test as per the command that's run in Stata:

T tests

This result shows that there is a statistically significant difference between the mean values of fridge_sales and 10000. Let's see whether you have more than one group to compare the means. In this case, you can use two independent sample t-tests.

Two independent sample t tests

Independent samples' t tests are utilized when we need to compare and check the averages of a variable...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime