What is F statistic in R and how to interpret it?

What is F statistic in R and how to interpret it

Recipe Objective

F-statistic is the ratio of two variances. It is named after Sir R. Fisher. It considers both between group variability as well as within group variability. Large F signifies greater dispersion. ​

F-test is used when you want to get the following insight: ​

  1. Whether the two samples coming from populations have equal variances.
  2. Wheteher a new process reduces the variance of existing process

Hypothesis testing with ANOVA includes the following: ​

  1. Null Hypothesis: There is no difference in the sample variances
  2. Alternate Hypothesis: The sample variances are not equal

In this recipe, we learn how to perform F-test in R. ​

STEP 1: Defining two groups with numeric values

group1 = c(33, 18, 22, 35, 46, 55, 20, 27, 34, 15) group2 = c(14, 15, 25, 27, 40, 45, 34, 60, 55, 58)

STEP 2: Carrying out F-test

var.test(group1,group2)

F test to compare two variances

data:  group1 and group2
F = 0.55868, num df = 9, denom df = 9, p-value = 0.3988
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
 0.1387681 2.2492399
sample estimates:
ratio of variances 
         0.5586794 

Result: After checking the p-value of the F-statistic, we see that it's higher than 0.05. This means that we accept the null hypothesis i.e. There is no difference in the two group variances

What Users are saying..

profile image

Anand Kumpatla

Sr Data Scientist @ Doubleslash Software Solutions Pvt Ltd
linkedin profile url

ProjectPro is a unique platform and helps many people in the industry to solve real-life problems with a step-by-step walkthrough of projects. A platform with some fantastic resources to gain... Read More

Relevant Projects

Detectron2 Object Detection and Segmentation Example Python
Object Detection using Detectron2 - Build a Dectectron2 model to detect the zones and inhibitions in antibiogram images.

Recommender System Machine Learning Project for Beginners-1
Recommender System Machine Learning Project for Beginners - Learn how to design, implement and train a rule-based recommender system in Python

Build a Review Classification Model using Gated Recurrent Unit
In this Machine Learning project, you will build a classification model in python to classify the reviews of an app on a scale of 1 to 5 using Gated Recurrent Unit.

FEAST Feature Store Example for Scaling Machine Learning
FEAST Feature Store Example- Learn to use FEAST Feature Store to manage, store, and discover features for customer churn prediction machine learning project.

End-to-End Speech Emotion Recognition Project using ANN
Speech Emotion Recognition using RAVDESS Audio Dataset - Build an Artificial Neural Network Model to Classify Audio Data into various Emotions like Sad, Happy, Angry, and Neutral

Build CNN for Image Colorization using Deep Transfer Learning
Image Processing Project -Train a model for colorization to make grayscale images colorful using convolutional autoencoders.

Abstractive Text Summarization using Transformers-BART Model
Deep Learning Project to implement an Abstractive Text Summarizer using Google's Transformers-BART Model to generate news article headlines.

NLP Project for Beginners on Text Processing and Classification
This Project Explains the Basic Text Preprocessing and How to Build a Classification Model in Python

Build a Text Generator Model using Amazon SageMaker
In this Deep Learning Project, you will train a Text Generator Model on Amazon Reviews Dataset using LSTM Algorithm in PyTorch and deploy it on Amazon SageMaker.

Ola Bike Rides Request Demand Forecast
Given big data at taxi service (ride-hailing) i.e. OLA, you will learn multi-step time series forecasting and clustering with Mini-Batch K-means Algorithm on geospatial data to predict future ride requests for a particular region at a given time.