FAQ: Hypothesis Testing with R - ANOVA

This community-built FAQ covers the “ANOVA” exercise from the lesson “Hypothesis Testing with R”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn R

FAQs on the exercise ANOVA

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!
You can also find further discussion and get answers to your questions over in Language Help.

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head to Language Help and Tips and Resources. If you are wanting feedback or inspiration for a project, check out Projects.

Looking for motivation to keep learning? Join our wider discussions in Community

Learn more about how to use this guide.

Found a bug? Report it online, or post in Bug Reporting

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

ANOVA

I’m having difficulty understanding the results of calling summary(results) and summary(results_new). Can someone please tell me where the p-values are?

6 Likes

I had the same question. From other sources on the internet, without being too sure, I think Pr(>F) is what we are interested in in this case. Look up anova, f value and Pr(>F) to be sure though.

1 Like

Hi,

Please note for my answer that I am not able to see the lesson and the prompt.
If you are looking for a p-value of an ANOVA, you are indeed looking in the right place: It’s the number in the column Pr(>F). It tells you the probability of seeing the data as you have it in your dataset if you assume the null hypothesis, which, in this case, is

“There is no difference between the sales of the different store categories”

The lower the p-value, the lower the probability of seeing such a sample given the null hypothesis, and if it is lower than a certain significance level, then we can conclude that we have evidence to suggest rejecting the null hypothesis, pointing us in favour of the alternative hypothesis,

“There is a difference between the sales of the different store categories.”

Note that you can never really “accept” the null or the alternative categories, since you might have a “weird” dataset which does not properly represent the population of stores, or some assumptions of the ANOVA are not met, or there might be many other issues with the dataset or the process.

I hope this helps, and all the best,

6 Likes