(Basic Statistics for Citizen Data Scientist)
Power of One Sample Variance Testing
Let represent the hypothetical variance and s2 the observed variance. Let x+crit be the right critical value (based on the null hypothesis with significance level α/2) and x-crit be the left critical value (two-tailed test) , i.e.
x-crit = CHIINV(1−α/2,n−1) x+crit = CHIINV(α/2,n−1)
Let δ = /s2. Then the beta value for the two-tailed test is given by
β = CHIDIST(δ*x-crit,n−1)−CHIDIST(δ*x+crit,n−1)
For the one-tailed test H0: ≤ , we use
xcrit= CHIINV(α,n−1)
β = 1−CHIDIST(δ*xcrit,n−1)
For the one-tailed test H0: ≥ , we use
xcrit = CHIINV(α,n−1)
β = CHIDIST(xcrit/δ,n−1)
Example 1: Calculate the power for the one-tailed and two-tailed tests from Example 3 of One Sample Variance Testing based on a sample of 50 pipes.
The results are shown in Figure 1: 73.4% for the one-tailed test and 63.9% for the two-tailed test.
Figure 1 – Power of a one sample test of the variance
Real Statistics Functions: The following function is provided in the Real Statistics Resource Pack:
VAR1_POWER(ratio, n, tails, α) = the power of a one sample chi-square variance test where ratio = /s2 (effect size), n = the sample size, tails = # of tails: 1 or 2 (default) and α = alpha (default = .05).
VAR1_SIZE(ratio, 1−β, tails, α) = the minimum sample size required to achieve power of 1−β (default .80) in a one sample chi-square variance test where ratio = /s2 (effect size), tails = # of tails: 1 or 2 (default) and α = alpha (default = .05).
For Example 1, VAR1_POWER(E7,E8,1,E10) = 0.733927 and VAR1_POWER(J7,J8,2,J10) = 0.638379, which is the same as the results shown in Figure 1.
Example 2: Calculate the sample size required to find an effect of size .64 with alpha = .05 and power of .80 for the one-tailed and two-tailed tests.
The one tailed test requires a sample size of VAR1_SIZE(.64, .80, 1, .05) = 67 and the two tailed test requires a sample of size VAR1_SIZE(.64) = VAR1_SIZE(.64, .80, 2, .05) = 86.
Statistics for Beginners in Excel – Confidence Intervals for Sampling Distributions
Statistics for Beginners in Excel – Power of One Sample Variance Testing
Disclaimer: The information and code presented within this recipe/tutorial is only for educational and coaching purposes for beginners and developers. Anyone can practice and apply the recipe/tutorial presented here, but the reader is taking full responsibility for his/her actions. The author (content curator) of this recipe (code / program) has made every effort to ensure the accuracy of the information was correct at time of publication. The author (content curator) does not assume and hereby disclaims any liability to any party for any loss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from accident, negligence, or any other cause. The information presented here could also be found in public knowledge domains.
Learn by Coding: v-Tutorials on Applied Machine Learning and Data Science for Beginners
Latest end-to-end Learn by Coding Projects (Jupyter Notebooks) in Python and R:
All Notebooks in One Bundle: Data Science Recipes and Examples in Python & R.
End-to-End Python Machine Learning Recipes & Examples.
End-to-End R Machine Learning Recipes & Examples.
Applied Statistics with R for Beginners and Business Professionals
Data Science and Machine Learning Projects in Python: Tabular Data Analytics
Data Science and Machine Learning Projects in R: Tabular Data Analytics
Python Machine Learning & Data Science Recipes: Learn by Coding
R Machine Learning & Data Science Recipes: Learn by Coding
Comparing Different Machine Learning Algorithms in Python for Classification (FREE)
There are 2000+ End-to-End Python & R Notebooks are available to build Professional Portfolio as a Data Scientist and/or Machine Learning Specialist. All Notebooks are only $29.95. We would like to request you to have a look at the website for FREE the end-to-end notebooks, and then decide whether you would like to purchase or not.