11/17/2024

What is P-Value?

  • To start with this project, I wanted to introduce P-value. It is basically a number that we can use to test our hypothesis is null or not, a small p-value will give us more confidence saying that our test is against the null hypothesis. Don’t worry, we will go deeper in the next few slides with examples and explanations. :)

Understanding P-value:

  • \(p \leq \alpha\): Here we have our p-value that is less than or equal to alpha, which means that we will reject our null hypothesis.
  • \(p > \alpha\): Here we have our p-value that is greater than our alpha, which means that we will accept our null-hypothesis.
  • It is very important to remember that our p-value is not an easy tool for use to determine the probability of the null hypothesis.

Little Details for P-Values

  • In order to best understand p-values, we need to know the thresholds because we need correct thresholds in order to calculate the support our null hypothesis or not. A common threshold range is between 0.05 and 0.01, which is the appropriate p-value we can use to determine the test results.

Visualizing P-Values

## Warning: 程序包'ggplot2'是用R版本4.4.2 来建造的

  • This is an example of how P-value graphs should be look like. Blue line is called Distribution Curve, which is basically use to test for the distribution of data. The Dashed Black line is Critical Values, which is use to determine if any of our data is acceptable, when it is outside of the Critical Values then we would not count those as validate data. The shaded Red Areas are the what we use to determine if we reject null hypothesis or the opposite.

Examples of How To Apply P-Value in Real life.

  • Hypothesis: We are located in the Diana’s Farm and the owner of the farm wanted to check if their average weight of apples are 150g so they can add those numbers in their commercials and people will come and buy this cheap and big apples! We are using Significance Level \(\alpha = 0.05\).
    • Null Hypothesis (\(H_0\)): Mean weight = 150g.
    • Alternative Hypothesis(\(H_a\)): Mean weight ≠ 150g.

Graph of P-Values

Conclusion of Graph

  • In the above slides we discuss about how can we use T-test to test for whether the apples inside Diana’s Farm has an average of 150g or not. After our calculations, we have a Test Statistic of t = 0.7 and P-value of p = 0.499, since p value is a lot greater than what we expected( 0.01 < p < 0.05), and Test Statistic is not greater than the Critical value of 2.26 which means our data is acceptable therefore we have come to an conclusion of there are no significant evidence to suggest that the average weight of apples in Diana’s Farm is 150g. The owner of farm will not be using this data as their commercial needs!

Application of P-values

  • Other than the use of calculating the weight of apples, p-value is actually a very important tool in a lot of fields. One of those fields that I think is important to discuss is the drug effectiveness testing. It is used in a lot of clinical stages to determine that whether the medicine or drugs will work. It is very important for drugs being tested before releasing out to the public. Another field is business which is what most people can think about. A lot of companies use p-values to determine the behavior of consumers and clients then provide the result that best fit each of them. This is a very important skill and it can lead to a lot of increase in revenue and sales.