0% found this document useful (0 votes)
96 views

Testing Hypothesis

1. Hypothesis testing is used to infer results from sample data about a larger population. It involves testing a hypothesis using statistical methods. 2. There are two main types of hypothesis tests - tests of means and tests of proportions. A two-sample t-test compares the means of two populations, while a two-proportion z-test compares the proportions of two populations. 3. Conducting hypothesis tests involves stating the null and alternative hypotheses, calculating the test statistic, determining the p-value, and evaluating whether to reject or fail to reject the null hypothesis by comparing the p-value to the significance level.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

Testing Hypothesis

1. Hypothesis testing is used to infer results from sample data about a larger population. It involves testing a hypothesis using statistical methods. 2. There are two main types of hypothesis tests - tests of means and tests of proportions. A two-sample t-test compares the means of two populations, while a two-proportion z-test compares the proportions of two populations. 3. Conducting hypothesis tests involves stating the null and alternative hypotheses, calculating the test statistic, determining the p-value, and evaluating whether to reject or fail to reject the null hypothesis by comparing the p-value to the significance level.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 51

TESTING THE

DIFFERENCE
BETWEEN TWO
MEANS AND
TWO
PROPORTION
ABESAMIS, Erika Renz N.
ESTANDIAN, Liza S.
GONZALES, Audrilyn Rocel A.
HIZOLE, Stephanie Danielle G.
REONAL , Mark Jemuell P.
VILLANUEVA, Lynlee Bless F.
Hypothesis Testing

It is used to infer the result of a hypothesis performed


on sample data from a larger population.
Statistical Hypothesis

sometimes called confirmatory data analysis, is


a hypothesis that is testable on the basis
of observing a process that is modeled via a set
of random variables.
Null Hypothesis

– a type of hypothesis used in statistics that proposes


that no statistical significance exists in a set of given
observations.
Alternative Hypothesis

– is the hypothesis used in hypothesis testing that is


contrary to the null hypothesis.
Types of Error

– Type I Errors occur when we reject a null


hypothesis that is actually true; the probability of this
occurring is denoted by alpha (a).

– Type II Errors are when we accept a null


hypothesis that is actually false; its probability is
called beta
Rejection Region

– is the interval, measured in the sampling


distribution of the statistic under study, that leads to
rejection of the null hypothesisH0 in a hypothesis
test.
Alpha Level

– is the probability of rejecting the null hypothesis


when the null hypothesis is true.
– The p-value is basically the probability of obtaining
your sample data IF the null hypothesis were true.

– The confidence interval is the range of likely


values for a population parameter, such as the
population mean.
TESTING
HYPOTHESIS
WITH ONE
SAMPLE
One Sample T-Test

– The one sample t-test compares a sample mean to


a hypothesized population mean to determine
whether two means are significantly different.
The assumptions of the one-
sample t-test are:
1. The data are continuous (not discrete).
2. The data follow the normal probability distribution.
3. The sample is a simple random sample from its
population. Each individual in the population has an
equal probability of being selected in the sample.
One Sample T-Test Example

– Sample question: Your company wants to improve


sales. Past sales data indicate that the average sale
was $100 per transaction. After training your sales
force, recent sales data (taken from a sample of 25
salesmen) indicates an average sale of $130, with a
standard deviation of $15. Did the training work?
Test your hypothesis at a 5% alpha level.
– Sample question: Your company wants to improve
sales. Past sales data indicate that the average sale
was $100 per transaction. After training your sales
force, recent sales data (taken from a sample of 25
salesmen) indicates an average sale of $130, with a
standard deviation of $15. Did the training work?
Test your hypothesis at a 5% alpha level.
Step 1: Write your null hypothesis statement (How to
state a null hypothesis). The accepted hypothesis is
that there is no difference in sales, so:
H0: μ = $100.
– Sample question: Your company wants to improve
sales. Past sales data indicate that the average sale
was $100 per transaction. After training your sales
force, recent sales data (taken from a sample of 25
salesmen) indicates an average sale of $130, with a
standard deviation of $15. Did the training work?
Test your hypothesis at a 5% alpha level.
Step 2: Write your alternate hypothesis. This is the
one you’re testing. You think that there is a difference
(that the mean sales increased), so:
Ha1: μ > $100.
– Sample question: Your company wants to improve sales.
Past sales data indicate that the average sale was $100
per transaction. After training your sales force, recent sales
data (taken from a sample of 25 salesmen) indicates an
average sale of $130, with a standard deviation of $15. Did
the training work? Test your hypothesis at a 5% alpha
level.
Step 3: Identify the following pieces of information you’ll need to
calculate the test statistic. The question should give you these items:
The sample mean(x̄). This is given in the question as $130.
The population mean(μ). Given as $100 (from past data).
The sample standard deviation(s) = $15.
Number of observations(n) = 25.
– Sample question: Your company wants to improve
sales. Past sales data indicate that the average sale
was $100 per transaction. After training your sales
force, recent sales data (taken from a sample of 25
salesmen) indicates an average sale of $130, with a
standard deviation of $15. Did the training work?
Test your hypothesis at a 5% alpha level.
Step 4: Insert the items from above into the t score
formula.
– Sample question: Your company wants to improve
sales. Past sales data indicate that the average sale
was $100 per transaction. After training your sales
force, recent sales data (taken from a sample of 25
salesmen) indicates an average sale of $130, with a
standard deviation of $15. Did the training work?
Test your hypothesis at a 5% alpha level.

Step 5: Find the t-table value. You need two values


to find this:
The alpha level: given as 5% in the question.
The degrees of freedom, which is the number of
items in the sample (n) minus 1: 25 – 1 = 24.
– Sample question: Your company wants to improve
sales. Past sales data indicate that the average sale
was $100 per transaction. After training your sales
force, recent sales data (taken from a sample of 25
salesmen) indicates an average sale of $130, with a
standard deviation of $15. Did the training work?
Test your hypothesis at a 5% alpha level.
– Step 6: Compare Step 4 to Step 5. The value from
Step 4 does not fall into the range calculated in
Step 5, so we can reject the null hypothesis. The
value of 10 falls into the rejection region (the left
tail).
Two-Sample t-Test

– A two-sample t-test is used to test the


difference (d0) between two population
means. A common application is to
determine whether the means are
equal.
Steps:

1. Define hypotheses.
2. Specify significance level
3. Find degrees of freedom.
4. Compute test statistic.
5. Compute P-value.
6. Evaluate null hypothesis.
1. Define hypotheses.

– The table below shows three sets of null and alternative hypotheses. Each makes a
statement about the difference d between the mean of one population μ1 and the
mean of another population μ2. (In the table, the symbol ≠ means " not equal to ".)

Set Null hypothesis Alternative Number of tails


hypothesis

1 μ1 - μ2 = d μ1 - μ2 ≠ d 2

2 μ1 - μ2 > d μ1 - μ2 < d 1

3 μ1 - μ2 < d μ1 - μ2 > d 1
2. Specify significance level

– Often, researchers choose significance levels equal to 0.01,


0.05, or 0.10; but any value between 0 and 1 can be used.
3. Find the degrees of freedom
(df)
4. Compute test statistic
– The test statistic is a t statistic (t) defined by the following equation.

where :
– x1 is the mean of sample 1, x2 is the mean of sample 2;
– s1 is the standard deviation of sample 1, s2 is the standard deviation of sample 2;
– n1 is the size of sample 1, and n2 is the size of sample 2.
5. Compute P-value.

– The P-value is the probability of observing a sample


statistic as extreme as the test statistic. Since the test
statistic is a t statistic, use the t Distribution Table to
assess the probability associated with the t statistic,
having the degrees of freedom computed above.
6. Evaluate null hypothesis

– The evaluation involves comparing the P-value to


the significance level, and rejecting the null
hypothesis when the P-value is less than the
significance level.
Sample Problem:

Within a school district, students were randomly assigned to one of


two Math teachers - Mrs. Smith and Mrs. Jones. After the assignment, Mrs.
Smith had 30 students, and Mrs. Jones had 25 students.
At the end of the year, each class took the same standardized test.
Mrs. Smith's students had an average test score of 78, with a standard
deviation of 10; and Mrs. Jones' students had an average test score of 85,
with a standard deviation of 15.
Test the hypothesis that Mrs. Smith and Mrs. Jones are equally
effective teachers. Use a 0.10 level of significance. (Assume that student
performance is approximately normal.)
HYPOTHESIS TEST :

TESTING
DIFFERENCE
BETWEEN
TWO
PROPORTION
TWO- PROPORTION Z- TEST

 Simple random sampling


 Samples are independent
 Each sample includes at least 10 successes and 10 failures
 Each population is at least 20 times as big as its sample
TESTING DIFFERENCE BETWEEN
TWO PROPORTION

1. State the hypothesis


2. Formulate an analysis plan
3. Analyze sample data
4. Interpret results
STATE THE HYPOTHESES

SET NULL ALTERNATIVE NUMBER


HYPOTHESIS HYPOTHESIS OF TAILS
1 𝑃1 − 𝑃2 = 0 𝑃1 − 𝑃2 ≠ 0 2
2 𝑃1 − 𝑃2 ≥ 0 𝑃1 − 𝑃2 < 0 1
3 𝑃1 − 𝑃2 ≤ 0 𝑃1 − 𝑃2 > 0 1
FORMULATE AN ANALYSIS PLAN

 Significance level

 Test method
ANALYZE SAMPLE DATA

 Pooled sample proportion


 Standard error
 Test statistic
 P- value
INTERPRET RESULTS

 Comparing the P- value to the significance level


SAMPLE PROBLEM

You are testing two flu drugs A and B. Drug A works


on 41 people out of a sample of 195. Drug B works
on 351 people in a sample of 605. Are the two
drugs comparable? Use a 5% alpha level.
TESTING
DIFFERENCE
BETWEEN
TWO
PROPORTION
P-VALUE

– The P-value is a probability that describes the


likelihood of the data if the null hypothesis is true.
More specifically, the P-value is the probability that
sample results are as extreme as or more extreme
than the data if the null hypothesis is true.
Steps of a hypothesis test as they relate
to a claim about a population proportion.

Step 1: Determine the hypotheses.


The hypotheses are claims about the population
proportion, p.
The null hypothesis is a hypothesis that the proportion
equals a specific value, p0.
The alternative hypothesis is the competing claim that
the parameter is less than, greater than, or not equal
to p0.
Steps of a hypothesis test as they relate
to a claim about a population proportion.

Step 2: Collect the data.


Since the hypothesis test is based on probability,
random selection or assignment is essential in data
production. Additionally, we need to check whether
the sample proportion can be np ≥ 10 and n(1 − p) ≥
10.
Steps of a hypothesis test as they relate
to a claim about a population proportion.

Step 3: Assess the evidence.


Determine the test statistic which is the z-score for
the sample proportion. The formula is:

Use the test statistic, together with the alternative


hypothesis to determine the P-value. You can use a
standard normal table (or Z-table) to find the P-
value.
Steps of a hypothesis test as they relate
to a claim about a population proportion.

– If the alternative hypothesis is greater than, the P-


value is the area to the right of the test statistic. If
the alternative hypothesis is less than, the P-value
is the area to the left of the test statistic. If the
alternative hypothesis is not equal to, the P-value is
equal to double the tail area beyond the test
statistic.
Steps of a hypothesis test as they relate
to a claim about a population proportion.

Step 4: Give the conclusion.


 A small P-value says the data is unlikely to occur if the null is true.
If the P-value is less than or equal to the significance level, we
reject the null hypothesis and accept the alternative hypothesis
instead.
 If the P-value is greater than the significance level, we say we “fail
to reject” the null hypothesis. We never say that we “accept” the
null hypothesis. We just say that we don’t have enough evidence
to reject it. This is equivalent to saying we don’t have enough
evidence to support the alternative hypothesis.
Steps of a hypothesis test as they relate
to a claim about a population proportion.

– We write the conclusion in the context of the


research question. Our conclusion is usually a
statement about the alternative hypothesis (we
accept Ha or fail to accept Ha) and should include
the P-value.
Other Hypothesis Testing Notes

 Remember that the P-value is the probability of seeing a


sample proportion as extreme as the one observed from the
data if the null hypothesis is true. The probability is about the
random sample, not about the null or alternative hypothesis.
 A larger sample size makes it more likely that we will reject
the null hypothesis if the alternative is true. Another way of
thinking about this is that increasing the sample size will
decrease the likelihood of a type II error. Recall that a type II
error is failing to reject the null hypothesis when the
alternative is true.
Other Hypothesis Testing Notes
 Increasing the sample size can have the unintended effect of making
the test sensitive to differences so small they don’t matter. A
statistically significant difference is one large enough that it is
unlikely to be due to sampling variability alone. Even a difference so
small that it is not important can be statistically significant if the
sample size is big enough.
 Finally, remember the phrase “garbage in, garbage out.” If the data
collection methods are poor, then the results of a hypothesis test are
meaningless. No statistical methods can create useful information if
our data comes from convenience or voluntary response samples.
Additionally, the results of a hypothesis test apply only to the
population from whom the sample was chosen.
EXAMPLE
– PROBLEM: According to the Government
Accountability Office, 80% of all college students
(ages 18 to 23) had health insurance in 2006. The
Patient Protection and Affordable Care Act of 2010
allowed young people under age 26 to stay on their
parents’ health insurance policy. Has the proportion
of college students (ages 18 to 23) who have health
insurance increased since 2006? A survey of 800
randomly selected college students (ages 18 to 23)
indicated that 83% of them had health insurance.
Use a 0.05 level of significance.
Activity

According to the Kaiser Family Foundation, 84% of U.S.


children ages 8 to 18 had Internet access at home as of
August 2009. Researchers wonder if this percentage has
changed since then. They survey 500 randomly selected
children (ages 8 to 18) and find that 430 of them have
Internet access at home.
Use a level of significance of α = 0.05 for this hypothesis
test.
BSCE-2E

ABESAMIS, Erika Renz N.


ESTANDIAN, Liza S.
GONZALES, Audrilyn Rocel A.
HIZOLE, Stephanie Danielle G.
REONAL , Mark Jemuell P.
VILLANUEVA, Lynlee Bless F.

You might also like