**Excel P-Value (Table of Content)**

## P-Value in Excel

- P-Value, also known as probability value, is used to understand the statistical significance of a finding.
- P-Value is used to test whether the Null Hypothesis is valid. If the P-Value indicates that the null hypothesis is unlikely, then this makes us believe that the alternative hypothesis might be true. In short, it enables us to determine if the obtained results are the result of chance or show that the two things we are testing are unrelated. P-Value is therefore an investigator rather than a judge.
- A P-Value is a number between 0 and 1, but it’s simpler to think of it in terms of percentages, such as 5% for a P-Value of 0.05. A smaller Pvalue leads to the rejection of the null hypothesis.
- Finding P-Value for correlation in excel is a relatively straightforward process, but there is no single function for the task; we will see the example for the same.
- The formula to calculate the P-Value is
**TDIST(x, deg_freedom, tails)**

**Null hypothesis:**

- When we are comparing two things with each other, then the null hypothesis is the assumption that there is no relation between those things.
- Before comparing two things with each other, we need to prove that there is some relation that exists between these two.
- When a P-Value rejects the null hypothesis, we can say that it has good chances for both things we are comparing to each other.

**How to Calculate P-Value in Excel?**

Let’s understand how to calculate P-Value in Excel by using relevant examples.

### P-Value in Excel – Example #1

In this example, we will calculate P-Value in Excel for the given data.

- As per the image below, you can see that we have collected data of cricketers and the runs they have made in a particular series.

- For this, we need another tail; we have to get the expected runs to be scored by each batsman.
- We will find the average runs for each player for the expected runs column by dividing our sum of counts by the sum of runs as follows.

- Here we have found the expected value by dividing our sum of counts by the sum of runs. Basically average, and in our case, it’s
**63.57**. - As we can see from the table, we have added the column for expected runs by dragging the formula used in cell C3.

Now to find P-Value for this particular expression, the formula for that is **TDIST(x, deg_freedom, tails).**

So here,

- x = range of our data, which are runs
- deg_freedom = range of the data of our expected values.
- tails = 2, as we want the answer for two tails.

** **

- From the above image, we can see that the results we got are nearly 0.
- So for this example, we can say that we have strong evidence in favor of the null hypothesis.

### P-Value in Excel – Example #2

- Here let’s assume some values to determine the support against qualifying the evidence.
- For our formula
**=TDIST(x, deg_freedom, tails).** - Here if we take x=t (test statistics), deg_freedom = n, tail = 1 or 2.

- Here as we can see the results, if we convert it into percentages, it’s 27.2%.

Similarly, you can find the P-Values by this method when values of x, n, and tails are provided.

### P-Value in Excel – Example #3

Here we will see how to calculate P-Value in excel for Correlation.

- While in excel, there isn’t a formula that gives a direct value of the correlation’s associated P-Value.
- So we have to get P-Value from correlation. Correlation is
**r**for P-Value as we have discussed before, to find P-Valuepvalue we have to find after getting correlation for the given values. - To find a correlation, the formula is
**CORREL(array1,array2)**

- From the correlation equation, we will find test statistics r. We can find
**t**for P-Value. - To derive
**t**from**r**the formula**t= (r*sqrt(n-2))/(sqrt(1-r^2)** - Now, suppose n (no. Of observation) is 10 and r=0.5

- From the above image, we have found
**t = 1.6329…** - Now to assess the significant value associated with t, simply use the TDIST function.

**=t.dist.2t(t, degree_freedom)**

- So the P-Value we have found for the given correlation is 0.1411.
- From this method, we can find the P-Value from the correlation, but after finding the correlation, we have to find t, and then after, we will be able to find the P-Value.

**A/B testing:**

- A/B testing is rather a regular example than an excel example of a P-Value.
- Here we are taking an example of a product launch event organized by a telecom company:
- We are going to categorize the data or engage people with historical data and observed data. Historical data in the sense of the expected people as per the past launch events.

**Test: 1 Expected Data**:

Total Visitors: 5,000

Engaged: 4,500

Left: 500

**Test: 2 Observed Data**:

Total Visitors: 7,000

Engaged: 6,000

Left: 1,000

- Now to find x
^{2, }we have to use the chi-squared formula, in mathematical its addition of (observed data – Expected)^{2}/ Expected. - For our observations its x
^{2 }= 1000

- Now, if we check our result with a chi-squared chart and just run through, our chi-squared score of 1000 with a degree of freedom 1.
- As per the above chi-squared table, the idea is we’ll move from left to right until we find a score that corresponds to our scores. Our approximate P-Value is then the P value at the top of the table aligned with your column.
- For our test, the score is very much high than the highest value in the given table of 10.827. So we can assume that P-Value for our test is less than 0.001 at least.
- If we run our score through GraphPad, we will see its value is less than 0.00001.

**Things To Remember About P-Value in Excel**

- P-Value involves measuring, comparing, and testing all things that constitute research.
- P-Value is not all research; it only helps you understand the probability of your results existing through chance against changed conditions.
- It doesn’t really tell you about causes, magnitude, or identifying variables.

### Recommended Articles

This has been a guide to P-Value in Excel. Here we discussed How to calculate P-Value along with practical examples and a downloadable excel template. You can also go through our other suggested articles –