2024-11-18

P-Value Definition

The p value is a number, calculated from a statistical test, that describes how likely you are to have found a particular set of observations if the null hypothesis were true.

P values are used in hypothesis testing to help decide whether to reject the null hypothesis. The smaller the p value, the more likely you are to reject the null hypothesis.

Data for P-Value Example

A P-Value is found using formula: \[\dfrac{X-\mu}{\sigma}\]

The first step of finding P values has to do with finding your hypothesis (null and alternate).

For the first example I will use to explain P-values and null and alternate hypothesis, I will use the age of absent employees from a data set.

Example Graph

X values are the weight in Kg and Y values are the height in Cm

Example Explanation + Step 1

For this example, lets assume the company found last year that the average weight of an employee using an absence was 86Kg and that weight caused a role in a portion of the absences. After a push for health within the company, they will take a sample of 50 weights of absences to see if the average amount is significantly less than 86Kg.

Step 1: In this case, the hypothesis would be: \[H_o: \mu = 86Kg\] and \[H_a: \mu<86Kg\]

Example Step 2

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   56.00   69.00   75.00   79.92   89.00  106.00
## [1] 14.04198

Step 2: Use a T-test \[t=(x-\mu)/(stdev/\sqrt n))\]

so for this example: \[t=(78.3-86)/(13.705/\sqrt 50)\]

Then you can use a T distribution table

Alternate Example 1:

Using the same data set, We can look at the age of those who were absent from work. The company estimates that due to its new focus on younger hires, it can bring down the average age from 39.5 down this year. Given a 50 employee sample, see if the average age is significantly less than last year’s 39.5.

\[H_o: \mu = 39.5\] and \[H_a: \mu<39.5\]

Alternate 1 Ex graph and data

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   28.00   28.25   36.00   35.14   39.75   48.00

Using Alternate 1 data

Now to find the T-test value: \[t=(37.14-39.5)/(6.7/50)\]

Now use T-table to find P value

Alternate Example 2:

One more example to solidify the given knowledge: The same company would like to use the average height of employees because they have noticed more absences and think the average height of employees has risen. Given that the average height last year was 168 cm, determine if the average height has significantly increased since last year. \[H_o: \mu = 168\] and \[H_a: \mu>168\]

Alternate 2 Ex graph and data

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   163.0   168.2   170.0   172.2   172.0   196.0

Using Alternate 2 data

Now to find the T-test value: \[t=(172-168)/(4.3/50)\]

Now use a T-table to find P-Value