WGU D599 Task 2: Statistical Analysis and Testing | Complete Report, Python
Code & Hypothesis Testing | 2026/2027 Updated
Actual Q&A – A+ Guarantee Format | Includes Drawings/Diagrams Where Needed – Hypothesis Testing 7-Step Workflow,
P-Value Interpretation Two-Tailed alpha 0.05 Critical Values -1.96 +1.96 Rejection Regions, Test Selection t-test 2 groups
ANOVA 3+ groups Chi-square categorical Pearson correlation, Type I Type II Errors alpha beta Power | Python Code
scipy.stats ttest_ind f_oneway chi2_contingency pearsonr
1. For D599 Task 2, what is hypothesis testing workflow? Refer to hypothesis
testing workflow diagram below.
Figure 1: HYPO diagram – refer to this drawing for question 1
A) Hypothesis testing workflow: 1 State Null H0 and Alternative Ha, 2 Choose
alpha 0.05, 3 Select test t-test ANOVA chi-square, 4 Calculate test statistic and
p-value via Python scipy.stats, 5 Compare p-value to alpha, 6 Decision Reject or
Fail to Reject H0, 7 Interpret conclusion in business context, as shown in 7-step
diagram
B) No workflow needed
C) Hypothesis testing same as no testing
D) Workflow deletes hypothesis
Answer: A
Rationale: Option A correct 7-step workflow as diagram shows state
hypotheses alpha test statistic p-value decision interpretation. Option B wrong
workflow structures testing. Option C wrong testing requires workflow. Option D
wrong workflow guides testing not deletes.
,2. What is p-value interpretation? Refer to p-value interpretation diagram below.
Figure 2: PVAL diagram – refer to this drawing for question 2
A) P-value is probability of observing test statistic as extreme or more extreme
than observed assuming H0 true, diagram shows two-tailed test alpha 0.05 critical
values -1.96 +1.96 rejection regions alpha/2=0.025 each tail red shaded, test
statistic 2.30 orange line in rejection region beyond critical, p-value area beyond
test statistic orange smaller than alpha, Decision Rule: If p-value < alpha 0.05 ->
Reject H0, If p-value >= alpha -> Fail to Reject H0, as shown
B) No p-value interpretation needed
C) P-value same as alpha always
D) P-value cannot be interpreted
Answer: A
Rationale: Option A correct p-value interpretation as diagram: normal
distribution H0, critical values +/-1.96, rejection regions 0.025 each, test statistic
2.30 beyond critical in rejection, p-value area beyond statistic, decision reject
H0 if p<alpha. Option B wrong interpretation essential. Option C wrong p-value
calculated from data, alpha chosen threshold. Option D wrong p-value
interpretable.
,3. When to use t-test vs ANOVA vs Chi-square? Refer to comparison of statistical
tests diagram below.
Figure 3: TESTS diagram – refer to this drawing for question 3
A) T-test compares means of 2 groups e.g., male vs female average spending
independent t-test or paired before after, ANOVA compares means of 3+ groups
e.g., spending across 4 regions F-statistic, Chi-square test of independence
association between 2 categorical variables e.g., product category and churn,
Correlation Pearson measures linear relationship between 2 continuous variables,
as shown in diagram with when to use each
B) Same test for all situations
C) No test selection needed
D) T-test same as ANOVA always
Answer: A
Rationale: Option A correct test selection criteria as diagram shows t-test 2
groups, ANOVA 3+ groups, chi-square categorical association, correlation
continuous relationship. Option B wrong different tests for different data types
and questions. Option C wrong test selection essential. Option D wrong t-test 2
groups, ANOVA 3+ groups, different.
, 4. What are Type I and Type II errors? Refer to Type I and Type II errors diagram
below.
Figure 4: ERRORS diagram – refer to this drawing for question 4
A) Type I error alpha false positive: Reject H0 when H0 true e.g., conclude
difference exists when no difference, Type II error beta false negative: Fail to reject
H0 when H0 false e.g., miss true difference, Power 1-beta ability to detect true
effect, tradeoff reducing alpha increases beta unless sample size increased, as
shown in matrix H0 true/false vs decision reject/fail to reject
B) No errors exist
C) Type I same as Type II
D) Errors same as correct decisions
Answer: A
Rationale: Option A correct Type I II errors definitions matrix and tradeoff as
diagram likely shows. Option B wrong errors exist. Option C wrong Type I false
positive alpha, Type II false negative beta. Option D wrong errors opposite of
correct decisions.
5. Explain Python code: from scipy.stats import ttest_ind; t_stat, p_val =
ttest_ind(group1, group2). What does it do?
A) Performs independent samples t-test comparing means of group1 and group2,
returns t-statistic and p-value, tests H0 means equal vs Ha means not equal, uses
alpha 0.05 to decide
B) No t-test performed
C) Performs ANOVA only
D) Deletes groups
Code & Hypothesis Testing | 2026/2027 Updated
Actual Q&A – A+ Guarantee Format | Includes Drawings/Diagrams Where Needed – Hypothesis Testing 7-Step Workflow,
P-Value Interpretation Two-Tailed alpha 0.05 Critical Values -1.96 +1.96 Rejection Regions, Test Selection t-test 2 groups
ANOVA 3+ groups Chi-square categorical Pearson correlation, Type I Type II Errors alpha beta Power | Python Code
scipy.stats ttest_ind f_oneway chi2_contingency pearsonr
1. For D599 Task 2, what is hypothesis testing workflow? Refer to hypothesis
testing workflow diagram below.
Figure 1: HYPO diagram – refer to this drawing for question 1
A) Hypothesis testing workflow: 1 State Null H0 and Alternative Ha, 2 Choose
alpha 0.05, 3 Select test t-test ANOVA chi-square, 4 Calculate test statistic and
p-value via Python scipy.stats, 5 Compare p-value to alpha, 6 Decision Reject or
Fail to Reject H0, 7 Interpret conclusion in business context, as shown in 7-step
diagram
B) No workflow needed
C) Hypothesis testing same as no testing
D) Workflow deletes hypothesis
Answer: A
Rationale: Option A correct 7-step workflow as diagram shows state
hypotheses alpha test statistic p-value decision interpretation. Option B wrong
workflow structures testing. Option C wrong testing requires workflow. Option D
wrong workflow guides testing not deletes.
,2. What is p-value interpretation? Refer to p-value interpretation diagram below.
Figure 2: PVAL diagram – refer to this drawing for question 2
A) P-value is probability of observing test statistic as extreme or more extreme
than observed assuming H0 true, diagram shows two-tailed test alpha 0.05 critical
values -1.96 +1.96 rejection regions alpha/2=0.025 each tail red shaded, test
statistic 2.30 orange line in rejection region beyond critical, p-value area beyond
test statistic orange smaller than alpha, Decision Rule: If p-value < alpha 0.05 ->
Reject H0, If p-value >= alpha -> Fail to Reject H0, as shown
B) No p-value interpretation needed
C) P-value same as alpha always
D) P-value cannot be interpreted
Answer: A
Rationale: Option A correct p-value interpretation as diagram: normal
distribution H0, critical values +/-1.96, rejection regions 0.025 each, test statistic
2.30 beyond critical in rejection, p-value area beyond statistic, decision reject
H0 if p<alpha. Option B wrong interpretation essential. Option C wrong p-value
calculated from data, alpha chosen threshold. Option D wrong p-value
interpretable.
,3. When to use t-test vs ANOVA vs Chi-square? Refer to comparison of statistical
tests diagram below.
Figure 3: TESTS diagram – refer to this drawing for question 3
A) T-test compares means of 2 groups e.g., male vs female average spending
independent t-test or paired before after, ANOVA compares means of 3+ groups
e.g., spending across 4 regions F-statistic, Chi-square test of independence
association between 2 categorical variables e.g., product category and churn,
Correlation Pearson measures linear relationship between 2 continuous variables,
as shown in diagram with when to use each
B) Same test for all situations
C) No test selection needed
D) T-test same as ANOVA always
Answer: A
Rationale: Option A correct test selection criteria as diagram shows t-test 2
groups, ANOVA 3+ groups, chi-square categorical association, correlation
continuous relationship. Option B wrong different tests for different data types
and questions. Option C wrong test selection essential. Option D wrong t-test 2
groups, ANOVA 3+ groups, different.
, 4. What are Type I and Type II errors? Refer to Type I and Type II errors diagram
below.
Figure 4: ERRORS diagram – refer to this drawing for question 4
A) Type I error alpha false positive: Reject H0 when H0 true e.g., conclude
difference exists when no difference, Type II error beta false negative: Fail to reject
H0 when H0 false e.g., miss true difference, Power 1-beta ability to detect true
effect, tradeoff reducing alpha increases beta unless sample size increased, as
shown in matrix H0 true/false vs decision reject/fail to reject
B) No errors exist
C) Type I same as Type II
D) Errors same as correct decisions
Answer: A
Rationale: Option A correct Type I II errors definitions matrix and tradeoff as
diagram likely shows. Option B wrong errors exist. Option C wrong Type I false
positive alpha, Type II false negative beta. Option D wrong errors opposite of
correct decisions.
5. Explain Python code: from scipy.stats import ttest_ind; t_stat, p_val =
ttest_ind(group1, group2). What does it do?
A) Performs independent samples t-test comparing means of group1 and group2,
returns t-statistic and p-value, tests H0 means equal vs Ha means not equal, uses
alpha 0.05 to decide
B) No t-test performed
C) Performs ANOVA only
D) Deletes groups