HT Part 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 76

Hypotheses testing (part 2)

MAT231
Ahmed K. Khalifa
ilos
• Calculate CI of proportion
• Calculate CI of variance
• Calculate CI of difference of means
• Calculate CI of difference of variance
• Calculate CI of difference of proportion
• Test hypotheses of difference of two means
• Test hypotheses of variance and proportion
• Proportion:
It is the percentage of specific feature to the
population

Example 40% is the percentage of female in


Egypt.
Confidence Intervals and Sample Size
for Proportions
Confidence Intervals for Variances and
Standard Deviations
X2 distribution (chi square)
• (n -1)s2 /2
• The chi-square test is a statistical test that
utilizes the chi-square distribution to assess
the association or independence between
categorical variables. It compares the
observed frequencies with the expected
frequencies under a specific hypothesis and
calculates a test statistic that follows a chi-
square distribution.
• The chi-square distribution is defined by a single
parameter called the degrees of freedom (df). The
degrees of freedom determine the shape of the
distribution. The chi-square distribution is positively
skewed and takes only non-negative values.
• Construction: The chi-square distribution is
constructed by summing the squares of independent
standard normal random variables. If Z1, Z2, ..., Zn are
independent standard normal random variables, then
the sum of their squares, X = Z1^2 + Z2^2 + ... + Zn^2,
follows a chi-square distribution with n degrees of
freedom (X ~ χ^2(df)).
Applications: The chi-square distribution is
commonly used in hypothesis testing,
particularly for testing the goodness of fit and
testing for independence in contingency tables.
It is also used in constructing confidence
intervals for population variances.
X2 test for variance and standard
deviation
• Reasons for Testing Variance:
There are several reasons why testing for variance can be important:
• Heterogeneity of Variability: Variability or spread of data can be an
important characteristic to consider in certain research contexts. For
example, in quality control or manufacturing processes, assessing whether
different production lines or treatments result in significantly different
variability can be crucial.

• Impact on Inference: If groups have unequal variances, it can affect the


assumptions of other statistical tests, such as t-tests or ANOVA. In such
cases, using tests that account for unequal variances, like Welch's t-test or
Brown-Forsythe test, can provide more accurate results.

• Comparing Variability: Researchers may be interested in investigating


whether different interventions, treatments, or conditions not only affect
the means but also the variability of the outcome variable.

• Understanding Data Patterns: Assessing variability can provide insights


into the nature of the data and potential factors contributing to
differences or patterns observed.
Type II Error and the Power of a Test
The value of  is not easy to compute. It
depends on several things, including the value of
a, the size of the sample, the population
standard deviation, and the actual difference
between the hypothesized value of the
parameter being tested and the true parameter.
The researcher has control over two of these
factors, namely, the selection of a and the size of
the sample.
What the researcher usually does is to try to
maximize the size of 1-, which is called the
power of a test.
The power of a statistical test measures the
sensitivity of the test to detect a real difference
in parameters if one actually exists.
The power of a test is a probability and, like all
probabilities, can have values ranging from 0 to
1.
If somehow it were known that  0.04, then the
power of a test would be 1 -0.04 = 0.96, or 96%.
In this case, the probability of rejecting the null
hypothesis when it is false is 96%.

 Increases   decreases
Comparing between two means
Comparing between two means
Testing the Difference Between
Proportions
tut
Testing the Difference Between Two
Variances
Shapes of Normal Curve:

You might also like