Data Science tutorials, Data Science eBooks, Data Science data sets,Data Science codes, Data Science programming languages, and Data Science reports.
Contents of the blog.
- Artificial Intelligence (2)
- big data analytics (2)
- Case studies (2)
- chisquare (3)
- Correlation (2)
- Data Preparation (5)
- Data Reduction (1)
- Data Reports (1)
- Data Visualization (5)
- Data Wrangling (5)
- Descriptive Statistics (15)
- face analysis (1)
- Hypothesis Testing (4)
- Image analysis. (2)
- Inferential Statistics (6)
- Learn SPSS (10)
- Linear regression (1)
- Machine learning (5)
- Maths for MBA's (2)
- Mean (4)
- Measures of Central tendency (5)
- Measures of Dispersion (3)
- Median. (2)
- multivariate analysis (2)
- Non parametric tests (3)
- One sample t test (1)
- paired sample t test (1)
- Parametric tests. (2)
- Primary data (2)
- Python for MBA's (9)
- quartiles (1)
- R for MBA's (11)
- Range (1)
- Research Methodology (6)
- Secondary data (2)
- Sentiment analysis (1)
- Spreadsheets using sheets and excel. (3)
- Standard Deviation (1)
- Support vector Machines. (1)
- T-test (2)
- Text analytics (1)
- validity tests (1)
- Variance (1)
Showing posts with label Parametric tests.. Show all posts
Showing posts with label Parametric tests.. Show all posts
Wednesday, June 3, 2020
Wednesday, May 27, 2020
Python for MBA's- One sample 't' test
T test
This is the most common hypothesis testing statistical test used in social science.Today we will learn how to calculate One sample 't ' test using Python.
Problem:
Let us take Virat Kohli's four innings score in 2020 in New zealand in T 20 matchesThey are
11,
38,
11,
45
His career average in T20 Internationals is 50.80
Now the hypothesis is
Virat Kohli's average in T20's in New Zealand 2020 series significantly differs from career T 20 International average.
The Python code is given below.
import numpy as np
from scipy.stats import norm
from scipy import stats
Virat_t20I=(11,38,11,45)
# Perform t-test and print result
t_result=stats.ttest_1samp(Virat_t20I, 50.8)
print(t_result)
# Test significance
alpha= 0.05
if (t_result[1] < alpha):
print("mean value of Virat_T20I differs from given value")
else:
print("No significant difference found")
Solution:
Ttest_1sampResult(statistic=-2.7523096064356434, pvalue=0.07060545196814848) No significant difference found
Subscribe to:
Posts (Atom)