![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to visualize the normality of a column of an R data frame?
The first step to analyze a variable is checking whether it is normally distributed or not and to visually do this, we create a histogram. If the histogram depicts a bell then we consider that the variable is normally distributed otherwise, it is not. We can create a histogram for any column of an R data frame by using hist function.
Example
Consider the below data frame −
set.seed(9) df<-data.frame(x1=rbinom(100,50,0.7),x2=rbinom(1000,50,0.7),x3=rbinom(5000,50,0.7))
Creating the histograms for x1, x2, and x3 −
hist(df$x1)
Output
hist(df$x2)
Output
hist(df$x3)
Output
Advertisements