What hypothesis test is suitable in this case?
up vote
-1
down vote
favorite
Null: Event frequency does not vary by weekday
Alternate: Event frequency varies by weekday
Data:
Day: Mon, Tue, Wed, Thu, Fri, Sat, Sun
event_count: 12, 15, 20, 10, 19, 10, 11
What hypothesis test (e.g chi-squared, p-test) would be best to investigate this relationship?
statistics statistical-inference hypothesis-testing
add a comment |
up vote
-1
down vote
favorite
Null: Event frequency does not vary by weekday
Alternate: Event frequency varies by weekday
Data:
Day: Mon, Tue, Wed, Thu, Fri, Sat, Sun
event_count: 12, 15, 20, 10, 19, 10, 11
What hypothesis test (e.g chi-squared, p-test) would be best to investigate this relationship?
statistics statistical-inference hypothesis-testing
1
Sounds like a goodness of fit.
– Sean Roberson
Nov 24 at 18:58
You might have avoided down-votes by venturing a solution and asking us whether it is correct. This once, I will give an outline of a chi-squared test as suggested by @SeanRoberson for you to follow and verify.
– BruceET
Nov 24 at 20:52
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
Null: Event frequency does not vary by weekday
Alternate: Event frequency varies by weekday
Data:
Day: Mon, Tue, Wed, Thu, Fri, Sat, Sun
event_count: 12, 15, 20, 10, 19, 10, 11
What hypothesis test (e.g chi-squared, p-test) would be best to investigate this relationship?
statistics statistical-inference hypothesis-testing
Null: Event frequency does not vary by weekday
Alternate: Event frequency varies by weekday
Data:
Day: Mon, Tue, Wed, Thu, Fri, Sat, Sun
event_count: 12, 15, 20, 10, 19, 10, 11
What hypothesis test (e.g chi-squared, p-test) would be best to investigate this relationship?
statistics statistical-inference hypothesis-testing
statistics statistical-inference hypothesis-testing
asked Nov 24 at 18:54
thatsnotmyname71
1
1
1
Sounds like a goodness of fit.
– Sean Roberson
Nov 24 at 18:58
You might have avoided down-votes by venturing a solution and asking us whether it is correct. This once, I will give an outline of a chi-squared test as suggested by @SeanRoberson for you to follow and verify.
– BruceET
Nov 24 at 20:52
add a comment |
1
Sounds like a goodness of fit.
– Sean Roberson
Nov 24 at 18:58
You might have avoided down-votes by venturing a solution and asking us whether it is correct. This once, I will give an outline of a chi-squared test as suggested by @SeanRoberson for you to follow and verify.
– BruceET
Nov 24 at 20:52
1
1
Sounds like a goodness of fit.
– Sean Roberson
Nov 24 at 18:58
Sounds like a goodness of fit.
– Sean Roberson
Nov 24 at 18:58
You might have avoided down-votes by venturing a solution and asking us whether it is correct. This once, I will give an outline of a chi-squared test as suggested by @SeanRoberson for you to follow and verify.
– BruceET
Nov 24 at 20:52
You might have avoided down-votes by venturing a solution and asking us whether it is correct. This once, I will give an outline of a chi-squared test as suggested by @SeanRoberson for you to follow and verify.
– BruceET
Nov 24 at 20:52
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
Outline of the appropriate chi-squared test:
Chi-squared goodness-of-fit test. Null hypothesis is that days are equally
likely categories for events: probability $1/7$ for each day. So out of
your 97 events the 'expected number' on each day is $E = 97/7 = 13.85714.$
Under the null hypothesis, the test statistic
$$Q = sum_{i=1}^7 frac{(X_i - E)^2}{E}$$
is approximately distributed as $mathsf{Chisq}(text{df} = 6).$
Check your text for this formula, possibly with slightly different
notation. Also, perhaps you can find a similar problem worked as an
example.
The computations below, using R statistical software, show
there is no evidence that events are other than evenly distributed
across days. You should verify the computations using a calculator and
the critical value from a printed table of chi-squared distributions (or
using a statistical calculator). [If you use a printed table, look on the row for DF = 6.]
X = c(12, 15, 20, 10, 19, 10, 11); t = sum(X)
[1] 97
E = 97/7
Q = sum((X - E)^2/E); Q
[1] 7.71134
qchisq(.95, 6)
[1] 12.59159 # critical value for 5% level test; Q < critical value
1 - pchisq(Q, 6)
[1] 0.2600232 # P-value of test > 5%
Note: The histogram below shows simulated values of $Q$ for 100,000 weeks where
days are equally likely. The density curve of $mathsf{Chisq}(6)$ is shown
in black. The histogram is well approximated by the chi-squared density.

Here is the approximate distribution of $Q$ when days are unlikely in such a way that two days (perhaps on weekends) share half of the events and the other five days share the other half. [Specifically, alternative probability vector $p_a = (.25, .1, .1, .1, .1, .1, .25).]$ The distribution is nowhere near
$mathsf{Chisq}(6).$ Most of the probability is above $12.6.$

Note: Here is R code for the first figure:
set.seed(1124); m = 10^5; n = 97; E = 97/7; q = numeric(m)
for(i in 1:m) {
d = sample(1:7, n, rep=T)
rle.inf = rle(sort(d)); X = rle.inf$len
q[i] = sum((X-E)^2/E) }
hist(q, prob=T, br=50, col="skyblue2", ylim=c(0, .14),
main="Simulated CHISQ(6) with Density")
curve(dchisq(x, 6), 0, 25, add=T, lwd=2)
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Outline of the appropriate chi-squared test:
Chi-squared goodness-of-fit test. Null hypothesis is that days are equally
likely categories for events: probability $1/7$ for each day. So out of
your 97 events the 'expected number' on each day is $E = 97/7 = 13.85714.$
Under the null hypothesis, the test statistic
$$Q = sum_{i=1}^7 frac{(X_i - E)^2}{E}$$
is approximately distributed as $mathsf{Chisq}(text{df} = 6).$
Check your text for this formula, possibly with slightly different
notation. Also, perhaps you can find a similar problem worked as an
example.
The computations below, using R statistical software, show
there is no evidence that events are other than evenly distributed
across days. You should verify the computations using a calculator and
the critical value from a printed table of chi-squared distributions (or
using a statistical calculator). [If you use a printed table, look on the row for DF = 6.]
X = c(12, 15, 20, 10, 19, 10, 11); t = sum(X)
[1] 97
E = 97/7
Q = sum((X - E)^2/E); Q
[1] 7.71134
qchisq(.95, 6)
[1] 12.59159 # critical value for 5% level test; Q < critical value
1 - pchisq(Q, 6)
[1] 0.2600232 # P-value of test > 5%
Note: The histogram below shows simulated values of $Q$ for 100,000 weeks where
days are equally likely. The density curve of $mathsf{Chisq}(6)$ is shown
in black. The histogram is well approximated by the chi-squared density.

Here is the approximate distribution of $Q$ when days are unlikely in such a way that two days (perhaps on weekends) share half of the events and the other five days share the other half. [Specifically, alternative probability vector $p_a = (.25, .1, .1, .1, .1, .1, .25).]$ The distribution is nowhere near
$mathsf{Chisq}(6).$ Most of the probability is above $12.6.$

Note: Here is R code for the first figure:
set.seed(1124); m = 10^5; n = 97; E = 97/7; q = numeric(m)
for(i in 1:m) {
d = sample(1:7, n, rep=T)
rle.inf = rle(sort(d)); X = rle.inf$len
q[i] = sum((X-E)^2/E) }
hist(q, prob=T, br=50, col="skyblue2", ylim=c(0, .14),
main="Simulated CHISQ(6) with Density")
curve(dchisq(x, 6), 0, 25, add=T, lwd=2)
add a comment |
up vote
1
down vote
Outline of the appropriate chi-squared test:
Chi-squared goodness-of-fit test. Null hypothesis is that days are equally
likely categories for events: probability $1/7$ for each day. So out of
your 97 events the 'expected number' on each day is $E = 97/7 = 13.85714.$
Under the null hypothesis, the test statistic
$$Q = sum_{i=1}^7 frac{(X_i - E)^2}{E}$$
is approximately distributed as $mathsf{Chisq}(text{df} = 6).$
Check your text for this formula, possibly with slightly different
notation. Also, perhaps you can find a similar problem worked as an
example.
The computations below, using R statistical software, show
there is no evidence that events are other than evenly distributed
across days. You should verify the computations using a calculator and
the critical value from a printed table of chi-squared distributions (or
using a statistical calculator). [If you use a printed table, look on the row for DF = 6.]
X = c(12, 15, 20, 10, 19, 10, 11); t = sum(X)
[1] 97
E = 97/7
Q = sum((X - E)^2/E); Q
[1] 7.71134
qchisq(.95, 6)
[1] 12.59159 # critical value for 5% level test; Q < critical value
1 - pchisq(Q, 6)
[1] 0.2600232 # P-value of test > 5%
Note: The histogram below shows simulated values of $Q$ for 100,000 weeks where
days are equally likely. The density curve of $mathsf{Chisq}(6)$ is shown
in black. The histogram is well approximated by the chi-squared density.

Here is the approximate distribution of $Q$ when days are unlikely in such a way that two days (perhaps on weekends) share half of the events and the other five days share the other half. [Specifically, alternative probability vector $p_a = (.25, .1, .1, .1, .1, .1, .25).]$ The distribution is nowhere near
$mathsf{Chisq}(6).$ Most of the probability is above $12.6.$

Note: Here is R code for the first figure:
set.seed(1124); m = 10^5; n = 97; E = 97/7; q = numeric(m)
for(i in 1:m) {
d = sample(1:7, n, rep=T)
rle.inf = rle(sort(d)); X = rle.inf$len
q[i] = sum((X-E)^2/E) }
hist(q, prob=T, br=50, col="skyblue2", ylim=c(0, .14),
main="Simulated CHISQ(6) with Density")
curve(dchisq(x, 6), 0, 25, add=T, lwd=2)
add a comment |
up vote
1
down vote
up vote
1
down vote
Outline of the appropriate chi-squared test:
Chi-squared goodness-of-fit test. Null hypothesis is that days are equally
likely categories for events: probability $1/7$ for each day. So out of
your 97 events the 'expected number' on each day is $E = 97/7 = 13.85714.$
Under the null hypothesis, the test statistic
$$Q = sum_{i=1}^7 frac{(X_i - E)^2}{E}$$
is approximately distributed as $mathsf{Chisq}(text{df} = 6).$
Check your text for this formula, possibly with slightly different
notation. Also, perhaps you can find a similar problem worked as an
example.
The computations below, using R statistical software, show
there is no evidence that events are other than evenly distributed
across days. You should verify the computations using a calculator and
the critical value from a printed table of chi-squared distributions (or
using a statistical calculator). [If you use a printed table, look on the row for DF = 6.]
X = c(12, 15, 20, 10, 19, 10, 11); t = sum(X)
[1] 97
E = 97/7
Q = sum((X - E)^2/E); Q
[1] 7.71134
qchisq(.95, 6)
[1] 12.59159 # critical value for 5% level test; Q < critical value
1 - pchisq(Q, 6)
[1] 0.2600232 # P-value of test > 5%
Note: The histogram below shows simulated values of $Q$ for 100,000 weeks where
days are equally likely. The density curve of $mathsf{Chisq}(6)$ is shown
in black. The histogram is well approximated by the chi-squared density.

Here is the approximate distribution of $Q$ when days are unlikely in such a way that two days (perhaps on weekends) share half of the events and the other five days share the other half. [Specifically, alternative probability vector $p_a = (.25, .1, .1, .1, .1, .1, .25).]$ The distribution is nowhere near
$mathsf{Chisq}(6).$ Most of the probability is above $12.6.$

Note: Here is R code for the first figure:
set.seed(1124); m = 10^5; n = 97; E = 97/7; q = numeric(m)
for(i in 1:m) {
d = sample(1:7, n, rep=T)
rle.inf = rle(sort(d)); X = rle.inf$len
q[i] = sum((X-E)^2/E) }
hist(q, prob=T, br=50, col="skyblue2", ylim=c(0, .14),
main="Simulated CHISQ(6) with Density")
curve(dchisq(x, 6), 0, 25, add=T, lwd=2)
Outline of the appropriate chi-squared test:
Chi-squared goodness-of-fit test. Null hypothesis is that days are equally
likely categories for events: probability $1/7$ for each day. So out of
your 97 events the 'expected number' on each day is $E = 97/7 = 13.85714.$
Under the null hypothesis, the test statistic
$$Q = sum_{i=1}^7 frac{(X_i - E)^2}{E}$$
is approximately distributed as $mathsf{Chisq}(text{df} = 6).$
Check your text for this formula, possibly with slightly different
notation. Also, perhaps you can find a similar problem worked as an
example.
The computations below, using R statistical software, show
there is no evidence that events are other than evenly distributed
across days. You should verify the computations using a calculator and
the critical value from a printed table of chi-squared distributions (or
using a statistical calculator). [If you use a printed table, look on the row for DF = 6.]
X = c(12, 15, 20, 10, 19, 10, 11); t = sum(X)
[1] 97
E = 97/7
Q = sum((X - E)^2/E); Q
[1] 7.71134
qchisq(.95, 6)
[1] 12.59159 # critical value for 5% level test; Q < critical value
1 - pchisq(Q, 6)
[1] 0.2600232 # P-value of test > 5%
Note: The histogram below shows simulated values of $Q$ for 100,000 weeks where
days are equally likely. The density curve of $mathsf{Chisq}(6)$ is shown
in black. The histogram is well approximated by the chi-squared density.

Here is the approximate distribution of $Q$ when days are unlikely in such a way that two days (perhaps on weekends) share half of the events and the other five days share the other half. [Specifically, alternative probability vector $p_a = (.25, .1, .1, .1, .1, .1, .25).]$ The distribution is nowhere near
$mathsf{Chisq}(6).$ Most of the probability is above $12.6.$

Note: Here is R code for the first figure:
set.seed(1124); m = 10^5; n = 97; E = 97/7; q = numeric(m)
for(i in 1:m) {
d = sample(1:7, n, rep=T)
rle.inf = rle(sort(d)); X = rle.inf$len
q[i] = sum((X-E)^2/E) }
hist(q, prob=T, br=50, col="skyblue2", ylim=c(0, .14),
main="Simulated CHISQ(6) with Density")
curve(dchisq(x, 6), 0, 25, add=T, lwd=2)
edited Nov 24 at 21:53
answered Nov 24 at 20:45
BruceET
34.9k71440
34.9k71440
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3011944%2fwhat-hypothesis-test-is-suitable-in-this-case%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Sounds like a goodness of fit.
– Sean Roberson
Nov 24 at 18:58
You might have avoided down-votes by venturing a solution and asking us whether it is correct. This once, I will give an outline of a chi-squared test as suggested by @SeanRoberson for you to follow and verify.
– BruceET
Nov 24 at 20:52