# How to find the p-value using F statistic in R?

R ProgrammingServer Side ProgrammingProgramming

#### Artificial Intelligence : The Future Of Programming

15 Lectures 54 mins

#### Beyond Basic Programming - Intermediate Python

Most Popular

36 Lectures 3 hours

#### C Programming from scratch- Master C Programming

Best Seller

60 Lectures 8 hours

The F statistic has two degrees of freedom, one for the numerator and one for the denominator and the F distribution is a right-tailed distribution. Therefore, we need to use the F-statistic, the degrees of freedoms, and the lower.tail=FALSE argument with pf function to find the p-value for a F statistic.

## Examples

Live Demo

> pf(5,1,99,lower.tail=F)
> pf(5,1,24,lower.tail=F)
> pf(5,1,239,lower.tail=F)
> pf(5,5,239,lower.tail=F)
> pf(5,5,49,lower.tail=F)
> pf(12,5,49,lower.tail=F)
> pf(120,5,49,lower.tail=F)
> pf(120,1,49,lower.tail=F)
> pf(120,1,149,lower.tail=F)
> pf(3,1,149,lower.tail=F)
> pf(3,2,149,lower.tail=F)
> pf(3,2,40,lower.tail=F)
> pf(3,1,320,lower.tail=F)
> pf(15,1,320,lower.tail=F)
> pf(27,2,320,lower.tail=F)
> pf(5,1,199,lower.tail=F)
> pf(5,1,27,lower.tail=F)
> pf(5,2,27,lower.tail=F)
> pf(5,9,27,lower.tail=F)
> pf(5,9,23,lower.tail=F)
> pf(5,5,23,lower.tail=F)
> pf(24,2,99,lower.tail=F)
> pf(2.1,2,99,lower.tail=F)
> pf(3.8,2,99,lower.tail=F)
> pf(3.8,5,99,lower.tail=F)
> pf(3.8,5,74,lower.tail=F)
> pf(38,5,74,lower.tail=F)
> pf(10,5,74,lower.tail=F)
> pf(10,5,19,lower.tail=F)
> pf(10,5,34,lower.tail=F)
> pf(6,5,34,lower.tail=F)
> pf(6,3,32,lower.tail=F)

## Output

[1] 0.0275923
[1] 0.03490774
[1] 0.026271
[1] 0.0002244696
[1] 0.0008874841
[1] 1.309484e-07
[1] 2.839434e-26
[1] 8.956653e-15
[1] 7.451338e-21
[1] 0.08533399
[1] 0.05280384
[1] 0.06110028
[1] 0.08422814
[1] 0.0001303822
[1] 1.46063e-11
[1] 0.02645775
[1] 0.03380921
[1] 0.01421306
[1] 0.0005263502
[1] 0.0008641507
[1] 0.00303368
[1] 3.174929e-09
[1] 0.1278784
[1] 0.02570162
[1] 0.00343476
[1] 0.00405754
[1] 4.026237e-19
[1] 2.447297e-07
[1] 8.237195e-05
[1] 5.983205e-06
[1] 0.0004415002
[1] 0.002305201
Updated on 04-Jan-2021 06:39:00

Advertisements