Skip to content

Data Science Tutorials

For Data Science Learners

  • How to Find Quartiles in R
    How to Find Quartiles in R? R
  • Data Science for Business: Unraveling the Fundamentals of Analysis Machine Learning
  • rejection region in hypothesis testing
    Rejection Region in Hypothesis Testing Statistics
  • How to Find Unmatched Records in R
    How to Find Unmatched Records in R R
  • Psychological Experimentation Software
    Psychological Experimentation Software: OpenSesame Opensesame
  • Top 10 Data Visualisation Tools
    Top 10 Data Visualisation Tools Every Data Science Enthusiast Must Know Course
  • Calculating Z-Scores in R: A Step-by-Step Guide R
  • How to create summary table in R
    How to create summary table in R R
Ogive Graph in R

Ogive Graph in R

Posted on February 26February 26 By Admin No Comments on Ogive Graph in R

Ogive Graph in R, An ogive is a graph that displays the proportion of data values in a dataset that is above or below a particular value.

The following ogive graph in R is created using the instructions in this tutorial:

Ogive Graph in R

For instance, make an Ogive graph in R.

Let’s first define a dataset with 20 values:

put up a dataset

data <- c(5, 6, 7, 8, 9, 12, 14, 16, 16, 17, 20, 22, 25, 30, 34, 35, 38, 41, 43, 45)

Next, let’s make a straightforward ogive graph in R using the graph.freq() and ogive.freq() functions from the agricolae package:

library(agricolae)

Let’s define values to plot

value_bins <- graph.freq(data, plot=FALSE)
values <- ogive.freq(value_bins, frame=FALSE)

Let’s create an ogive chart

plot(values, xlab='Values', ylab='Relative Cumulative Frequency',
main='Ogive Chart', col='steelblue', type='b', pch=19, las=1, bty='l')

The y-axis displays the relative cumulative frequency of values that fall below the levels given on the x-axis while the x-axis displays values from the dataset.

Predictive Modeling and Data Science – Data Science Tutorials

The following describes how to interpret some of the plot() function’s more enigmatic arguments:

type=’b’: Plot both lines and points
pch=19: Fill in the circles in the plot
las=1: Make labels perpendicular to axis
bty=’l’: Only show the border on the bottom and left sides of the plot

We can view the actual values in the plot by printing the values created from the ogive.freq() function:

Now we can view the values in ogive

values
   x  RCF
1  5 0.00
2 13 0.30
3 21 0.55
4 29 0.65
5 37 0.80
6 45 1.00
7 53 1.00

Here’s how to interpret the values:

0% of all values in the dataset were less than or equal to 5.

30% of all values in the dataset were less than or equal to 13.

55% of all values in the dataset were less than or equal to 21.

65% of all values in the dataset were less than or equal to 29.

And so on.

Learn Hadoop for Data Science – Data Science Tutorials

Check your inbox or spam folder to confirm your subscription.

R

Post navigation

Previous Post: Is R or Python Better for Data Science in Bangalore
Next Post: Top Data Modeling Tools for 2023

Related Posts

  • Two Sample Proportions test in R
    Two Sample Proportions test in R-Complete Guide R
  • How to Label Outliers in Boxplots in ggplot2
    How to Label Outliers in Boxplots in ggplot2? R
  • Hypothesis Testing in R Programming
    Hypothesis Testing in R Programming R
  • Logistic Function in R R
  • Solving Systems of Equations in R R
  • How to Use Gather Function in R
    How to Use Gather Function in R?-tidyr Part2 R

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Best Prompt Engineering Books
  • Understanding Machine Learning and Data Science
  • Best Git Books
  • Top 5 Books to Learn Data Engineering
  • Mastering R Programming for Data Science: Tips and Tricks
  • About Us
  • Contact
  • Disclaimer
  • Privacy Policy

https://www.r-bloggers.com

  • YouTube
  • Twitter
  • Facebook
  • Course
  • Excel
  • Machine Learning
  • Opensesame
  • R
  • Statistics

Check your inbox or spam folder to confirm your subscription.

  • How to Add Superscripts and Subscripts to Plots in R?, The basic syntax for adding superscripts or subscripts to charts in R is as follows:
    How to Add Superscripts and Subscripts to Plots in R? R
  • In data science, what Is Open Innovation?
    In data science, what Is Open Innovation? R
  • Dealing Missing values in R
    Dealing With Missing values in R R
  • Separate a data frame column into multiple columns
    Separate a data frame column into multiple columns-tidyr Part3 R
  • Best Books on Data Science with Python
    Best Books on Data Science with Python Course
  • Checking Missing Values in R
    Checking Missing Values in R R
  • How to Avoid Overfitting
    How to Avoid Overfitting? Machine Learning
  • Adding Subtitles in ggplot2 R

Privacy Policy

Copyright © 2025 Data Science Tutorials.

Powered by PressBook News WordPress theme