Program to try various plots in R -Assignment -10
Problem Statement:
1.Plot the internal marks against roll numbers using a line graph.
Purpose
A line graph is useful for observing changes or trends across an ordered sequence.
Here, the roll number provides the sequence and internal mark is the measured value.
2.Compare the number of students in each department using a bar plot.
Purpose
A bar plot is suitable for comparing frequencies of categorical data.
3.Investigate the relationship between attendance and internal marks using a scatter plot.
Purpose
A scatter plot is used to investigate the relationship between two numerical variables.
Students can observe whether students with higher attendance tend to obtain higher internal marks.
4.Show the grade distribution using a pie chart.
Purpose
A pie chart represents the proportion or percentage contribution of categories to a whole.
5.Examine the distribution of internal marks using a histogram.
Purpose
A histogram shows the frequency distribution of a numerical variable.
Students can observe how the internal marks are distributed over different intervals.
6.Compare internal marks across departments using a box plot.
Purpose
A box plot can be used to compare:
- Median
- Spread
- Quartiles
- Possible outliers
between different groups.
7.Display individual internal-mark observations for each department using a strip chart.
Purpose
A strip chart displays the individual observations belonging to each category.
It is particularly useful with small datasets because students can see every individual observation.
(All graphs must be drawn with proper title , axes label and appropriate colors)
Learning outcome
By completing this experiment, students will understand which type of plot is appropriate for which type of data:
| Plot | Main purpose | Variables used |
|---|---|---|
| Line graph | Show trend/change | Roll No. – Internal Mark |
| Bar plot | Compare categories | Department – Frequency |
| Scatter plot | Study relationship | Attendance – Internal Mark |
| Pie chart | Show proportions | Grade – Frequency |
| Histogram | Show numerical distribution | Internal Mark |
| Box plot | Compare distributions | Department – Internal Mark |
| Strip chart | Show individual observations | Department – Internal Mark |
Comments
Post a Comment