hideHelp Amara.org break down language barriers and make media truly global by Donating to the Participatory Culture Foundation (PCF).
Join us in creating a more inclusive digital world!

< Return to Video

Hypothesis Testing for Proportions

  • 0:02 - 0:06
    Hi. This video is a continuation
    of our hypothesis testing video.
  • 0:07 - 0:11
    We just finished an example of
    doing hypothesis testing for means.
  • 0:11 - 0:12
    One sample.
  • 0:12 - 0:16
    Now we're going to talk about a one
    sample hypothesis test for proportions.
  • 0:17 - 0:21
    Up here, in our previous example,
  • 0:21 - 0:22
    I talked about the major
    steps that you take.
  • 0:22 - 0:26
    You state your hypotheses, collect
    data, construct a test statistic.
  • 0:26 - 0:29
    Apply a decision rule,
    either a critical region
  • 0:29 - 0:33
    or a p value, and draw
    conclusions in context.
  • 0:33 - 0:36
    So we're going to follow those
    exact same steps again here.
  • 0:36 - 0:39
    So I'm going to say this
    is for proportions now.
  • 0:40 - 0:42
    Our null hypothesis is well
  • 0:42 - 0:46
    I guess the research question is- is
    we're going to be interested in seeing
  • 0:47 - 0:51
    if, the proportion of red haired
  • 0:51 - 0:55
    people is equal to point one five. So,
  • 0:56 - 0:59
    proportion of red
  • 0:59 - 1:03
    haired people is point one five.
  • 1:03 - 1:07
    And the alternative we're just
    going to do, it's simply a two sided.
  • 1:07 - 1:12
    So proportion of red haired people is not
  • 1:13 - 1:16
    point one five, okay.
  • 1:17 - 1:21
    The data we are going to be using
    is from the hair eye color dataset.
  • 1:22 - 1:25
    Same dataset we used in our
    confidence interval section.
  • 1:25 - 1:29
    So as you can see here,
    it has a table of different hair
  • 1:29 - 1:34
    colors, eye colors and
    different sexes for some students.
  • 1:35 - 1:39
    So to get the total number of red
    haired people, you just sum up
  • 1:40 - 1:42
    all of the values of red haired people.
  • 1:42 - 1:46
    So ten plus ten plus seven plus
    seven, and then sixteen plus seven
  • 1:46 - 1:49
    plus seven, plus seven.
  • 1:49 - 1:52
    will give you seventy-one.
  • 1:53 - 1:54
    Okay.
  • 1:56 - 1:58
    I'm just gonna put a note here.
  • 1:58 - 2:00
    seventy-one red haired people.
  • 2:01 - 2:02
    Okay.
  • 2:03 - 2:08
    So a test statistic for
    a proportion is given.
  • 2:08 - 2:11
    You're going to need to have a,
  • 2:12 - 2:14
    a p hat value.
  • 2:14 - 2:18
    You're going to need to
    have a hypothesized value.
  • 2:18 - 2:21
    And you're going to need to know
    the number of observations.
  • 2:21 - 2:25
    So I'm going to do the total
    number of observations first.
  • 2:25 - 2:26
    So we're going to
  • 2:26 - 2:30
    just we're not actually going to use
    the length function in this case.
  • 2:31 - 2:34
    Since this is in a table,
    I'm going to just sum up
  • 2:35 - 2:37
    all of the numbers in this whole table.
  • 2:37 - 2:41
    And that'll give us the total number
    of observations in this data set,
  • 2:42 - 2:45
    which is five-hundred-and-ninety-two.
  • 2:45 - 2:48
    And then our, p hat is
    our sample proportion.
  • 2:49 - 2:52
    So our sample we had seventy-one
  • 2:52 - 2:55
    red- red haired people.
  • 2:55 - 2:56
    And in order to get a proportion,
  • 2:56 - 3:00
    we need to divide that by
    the total number of people.
  • 3:00 - 3:03
    So that'll be seventy-one
    divided by five ninety-two,
  • 3:03 - 3:07
    which is also equal to
    point one one nine nine.
  • 3:09 - 3:11
    And then the last thing
    we will need is wherever
  • 3:11 - 3:15
    our hypothesized proportion is,
    usually denoted like with p naught.
  • 3:16 - 3:18
    So I'm going to call it p zero.
  • 3:18 - 3:22
    And this is chosen by us the
    researcher or the statistician.
  • 3:22 - 3:25
    And it is point one five.
  • 3:25 - 3:26
    Okay.
  • 3:26 - 3:29
    So now since we usually use
  • 3:29 - 3:33
    a standard normal table or a
    normal distribution for proportions,
  • 3:34 - 3:37
    I'm going to call this
    the r z test statistic.
  • 3:38 - 3:41
    And for a proportion, it's
  • 3:41 - 3:44
    we will calculate it as being p hat
  • 3:45 - 3:49
    minus p naught,
    the hypothesized value
  • 3:50 - 3:54
    divided by the square root of
  • 3:56 - 3:59
    Now there's a numerator and denominator
  • 3:59 - 4:02
    inside this.
  • 4:03 - 4:04
    Inside this square root.
  • 4:04 - 4:06
    So it's going to have
    a lot of parentheses.
  • 4:06 - 4:12
    But if you just are very aware of all
    your parentheses, it'll be just fine.
  • 4:14 - 4:15
    So this is
  • 4:15 - 4:18
    p naught times
    one minus p naught.
  • 4:19 - 4:23
    Then outside of
  • 4:23 - 4:26
    But let's see.
  • 4:29 - 4:30
    All right.
  • 4:30 - 4:33
    So we have closed the
    parentheses for this one.
  • 4:33 - 4:35
    And then.
  • 4:38 - 4:38
    Close
  • 4:38 - 4:42
    the parentheses for that p naught
    times one minus p naught.
  • 4:42 - 4:44
    So it's still inside the square root.
  • 4:44 - 4:47
    We will also divide that by n
    and then this parentheses
  • 4:48 - 4:51
    will close off the end of the square root.
  • 4:53 - 4:56
    And that'll close off the
    end of the denominator.
  • 4:56 - 4:59
    And that will give us.
  • 5:00 - 5:05
    A value of negative two
    point zero four eight eight
  • 5:05 - 5:08
    So that is our test statistic.
  • 5:08 - 5:11
    For this hypothesis test.
  • 5:11 - 5:14
    Now to apply a decision rule
  • 5:14 - 5:17
    we're going to start off
    with our rejection region.
  • 5:17 - 5:19
    Before we do that, we always have
  • 5:19 - 5:24
    the researcher set our preferred
    or a set significance level,
  • 5:24 - 5:29
    usually it's point zero five,
    but obviously that is up to you.
  • 5:31 - 5:35
    So we are going to
    find a rejection region.
  • 5:36 - 5:39
    And we are going to be
    using the Q norm functions
  • 5:39 - 5:42
    because we use the normal
    distribution when doing
  • 5:42 - 5:45
    any kind of inference
    with proportions.
  • 5:45 - 5:51
    And we want to find a tail
    probability that is our significance
  • 5:51 - 5:55
    level divided by two because we are
    doing a two sided hypothesis test.
  • 5:55 - 5:59
    So we want the two tails
    to each have alpha over two.
  • 6:01 - 6:05
    And since our test statistic is
    negative means--meaning that
  • 6:05 - 6:10
    it's on the left hand side of the
    curve, we want to get a lower or a,
  • 6:11 - 6:13
    left hand probability.
  • 6:13 - 6:14
    Tail probability.
  • 6:14 - 6:17
    We're going to say lower
    dot tail equals true.
  • 6:19 - 6:22
    There we go, and then our value
  • 6:22 - 6:27
    where we would reject is
    negative one point nine six.
  • 6:28 - 6:31
    So this tells us that if we got a test,
  • 6:31 - 6:37
    if we ever get a test statistic that is
    less than negative one point nine six
  • 6:37 - 6:41
    or greater than positive
    one point nine six,
  • 6:41 - 6:44
    we will reject our null hypothesis.
  • 6:44 - 6:46
    Our test statistic is smaller
  • 6:48 - 6:50
    than negative one point nine six.
  • 6:50 - 6:53
    So we would reject our null
    hypothesis and say that
  • 6:53 - 6:57
    the true proportion of red haired
    people is not point one five.
  • 6:58 - 7:02
    Our sample we got was point one two.
  • 7:02 - 7:07
    So you know, point two, point one two,
    point one five, you know, pretty close.
  • 7:07 - 7:10
    But it's not exactly point one five.
  • 7:10 - 7:13
    It's probably something different
  • 7:13 - 7:18
    then if you want to do, a finding
  • 7:19 - 7:21
    you're doing your decision rule.
  • 7:21 - 7:23
    You can also do it with p values.
  • 7:23 - 7:25
    So we are doing a two sided test again.
  • 7:25 - 7:29
    So we will also multiply this and p
  • 7:30 - 7:33
    the p like tail value
    probability value by two.
  • 7:34 - 7:37
    And the critical value
    that we will plug in here
  • 7:37 - 7:41
    to find the probability
    is z dot test dot stat.
  • 7:41 - 7:43
    The one we got from our data.
  • 7:43 - 7:47
    And again we will say
    lower dot tail equals true
  • 7:47 - 7:51
    because we are finding a
    extreme or tail probability.
  • 7:53 - 7:58
    So our two sided p value is
    point zero four zero five.
  • 7:59 - 8:03
    And so this is where we compare it to
    our alpha value which is point zero five.
  • 8:03 - 8:08
    So if our p value is less
    than alpha point zero five
  • 8:08 - 8:11
    that means we reject
    our null hypothesis.
  • 8:11 - 8:15
    This value is just barely, but it
    is still less than point zero five.
  • 8:16 - 8:20
    So in this case we would
    reject our null hypothesis again.
  • 8:20 - 8:26
    And say that the true proportion of
    red haired people is not point one five.
  • 8:27 - 8:32
    Where, whatever decision rule
    you applied, whether it's rejection
  • 8:32 - 8:36
    region or a p value, you should be
    coming to the same conclusion.
  • 8:37 - 8:41
    On whether to reject or fail
    to reject your null hypothesis.
  • 8:42 - 8:46
    You shouldn't be getting
    different conclusions with these.
  • 8:48 - 8:51
    And there are other
    functions, kind of like
  • 8:51 - 8:54
    how I talked about the confidence
    intervals for proportion video.
  • 8:55 - 8:59
    There are, functions
    out there that can do
  • 9:00 - 9:03
    a one sample proportion test,
  • 9:03 - 9:06
    because, you know, for means
    you can easily just use t dot test.
  • 9:08 - 9:10
    But there are ones for
    proportions out there,
  • 9:10 - 9:14
    but they do require you to
    download other packages
  • 9:14 - 9:17
    and kind of do the research and
    find out those other functions.
  • 9:17 - 9:21
    And so just to kind of make it as
    simple as possible for you guys
  • 9:21 - 9:24
    so you don't have to go find
    that all that information.
  • 9:25 - 9:29
    We thought we would just show you
    how to do it by hand here, and,
  • 9:29 - 9:31
    you'll get the same conclusions.
  • 9:31 - 9:31
    So--
  • 9:31 - 9:36
    Anyway, hopefully that this
    these videos were helpful for you
  • 9:36 - 9:41
    in helping out with hypothesis
    testing for means and for proportions.
  • 9:41 - 9:42
    All right.
  • 9:42 - 9:45
    We will see you later in the next r video.
  • 9:45 - 9:46
    Have a good one.
Title:
Hypothesis Testing for Proportions
Video Language:
English
Duration:
09:47
Utah_State_University edited English subtitles for Hypothesis Testing for Proportions May 16, 2025, 6:54 PM
Utah_State_University edited English subtitles for Hypothesis Testing for Proportions May 14, 2025, 4:52 PM
Utah_State_University edited English subtitles for Hypothesis Testing for Proportions May 12, 2025, 7:19 PM
Utah_State_University edited English subtitles for Hypothesis Testing for Proportions May 12, 2025, 6:57 PM

English subtitles

Revisions Compare revisions

  • Revision 4 Edited
    Utah_State_University May 16, 2025, 6:54 PM
  • Revision 3 Edited
    Utah_State_University May 14, 2025, 4:52 PM
  • Revision 2 Edited
    Utah_State_University May 12, 2025, 7:19 PM
  • Revision 1 Uploaded
    Utah_State_University May 12, 2025, 6:57 PM