0% found this document useful (0 votes)
4 views9 pages

R Programming

The document presents a dataset of student marks categorized as Excellent, Average, and Below Average, with a total of 101 observations. Summary statistics indicate a mean of 69.7, a median of 68, and a standard deviation of 17.0 among the marks. Additionally, a bar chart visualizes the distribution of student marks across these categories.

Uploaded by

brigcse05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views9 pages

R Programming

The document presents a dataset of student marks categorized as Excellent, Average, and Below Average, with a total of 101 observations. Summary statistics indicate a mean of 69.7, a median of 68, and a standard deviation of 17.0 among the marks. Additionally, a bar chart visualizes the distribution of student marks across these categories.

Uploaded by

brigcse05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

StudentID Marks Category

1 1 70 Average

2 2 54 Below Average

3 3 90 Excellent

4 4 53 Below Average

5 5 42 Below Average

6 6 81 Excellent

7 7 89 Excellent

8 8 93 Excellent

9 9 82 Excellent

10 10 76 Excellent

11 11 91 Excellent

12 12 53 Below Average

13 13 93 Excellent

14 14 64 Average

15 15 65 Average

16 16 66 Average

17 17 44 Below Average

18 18 90 Excellent

19 19 66 Average

20 20 96 Excellent

21 21 67 Average

22 22 96 Excellent

23 23 48 Below Average

24 24 68 Average

25 25 74 Average

26 26 47 Below Average

27 27 65 Average

28 28 46 Below Average

29 29 81 Excellent

30 30 48 Below Average

31 31 58 Below Average

32 32 75 Average

33 33 53 Below Average

34 34 56 Below Average

35 35 82 Excellent

36 36 78 Excellent

37 37 92 Excellent

38 38 51 Below Average

39 39 54 Below Average

40 40 71 Average

41 41 81 Excellent
42 42 84 Excellent

43 43 46 Below Average

44 44 48 Below Average

45 45 80 Excellent

46 46 49 Below Average

47 47 62 Average

48 48 66 Average

49 49 99 Excellent

50 50 92 Excellent

51 51 70 Average

52 52 54 Below Average

53 53 90 Excellent

54 54 53 Below Average

55 55 42 Below Average

56 56 81 Excellent

57 57 89 Excellent

58 58 93 Excellent

59 59 82 Excellent

60 60 76 Excellent

61 61 91 Excellent

62 62 53 Below Average

63 63 93 Excellent

64 64 64 Average

65 65 65 Average

66 66 66 Average

67 67 44 Below Average

68 68 90 Excellent

69 69 66 Average

70 70 96 Excellent

71 71 67 Average

72 72 96 Excellent

73 73 48 Below Average

74 74 68 Average

75 75 74 Average

76 76 47 Below Average

77 77 65 Average

78 78 46 Below Average

79 79 81 Excellent

80 80 48 Below Average

81 81 58 Below Average

82 82 75 Average

83 83 53 Below Average
84 84 56 Below Average

85 85 82 Excellent

86 86 78 Excellent

87 87 92 Excellent

88 88 51 Below Average

89 89 54 Below Average

90 90 71 Average

91 91 81 Excellent

92 92 84 Excellent

93 93 46 Below Average

94 94 48 Below Average

95 95 80 Excellent

96 96 49 Below Average

97 97 62 Average

98 98 66 Average

99 99 99 Excellent

100 100 92 Excellent

101 101 87 Excellent


Environment History Connections Tutorial

HImport Dataset 237 MB E List -

R Global Environment

Data
O data 101 obs. of 4 variables
Ostudent marks 100 obs. of 3 variables
Osummary_stats 1 obs. of 14 variables
$ Mean :num 69.7
$ Median num
$ Mode num 48
$ Standard_Deviation num 17
S Variance num 287
$ Min num 42
$ Max num 99
S Range num 57
S IQR num 29
$ el071::skewness Marks, rm = TRUE): num 0.0404
na.
$ e1071::kurtosis(Marks, na.rm = TRUE): num -1.33
S Coefficient_of_Variation : num 0.243
S Quantile_25 Named num 53
..- attr(*, "names")= chr "2596"
S Quantile_75 : Named num 82
attr(*, "names")= chr "7 5%"
2 install.packages ("e1071")
3 install.packages ("dplyr")
4 # Load necessary libraries
5 1ibrary(readxl)
6 1ibrary(ggplot2)
7 1ibrary (dplyr)
8
# Read the Excel file
10 data <- read excel("data.xlsx", sheet = "Sheet1")
11
12 # Convert Category column to a factor
1: datasCategory <- as.factor (dataSCategory)
14
15 # Summary statistics
16 summary_stats <- data %>% summarize(
17 Mean = mean (Marks, na. rm = TRUE),
18 Median = median(Marks, na. rm = TRUE),
19 Mode as.numeric(names(sort(table(Marks), decreasing = TRUE) [1])),
20 Standard_Deviation = sd(Marks, na. rm = TRUE),
21 Variance = var(Marks, na. rm = TRUE),
22 Min = min (Marks, na. rm = TRUE),
23 Max max (Marks,na. rm TRUE),
24 Range = max (Marks, na. rm = TRUE) min (Marks, na. rm = TRUE),
25 IQR = IQR (Marks, na. rm = TRUE),
26 el071: :skewness (Marks, na. rm TRUE),
27 el071::kurtosis (Marks, na. rm = TRUE),
28 Coefficient _of_Variation = sd(Marks, na.rm = TRUE) / mean (Marks, na. rm = TRUE),
20 Quanti le_25 = quantile(Marks, 0.25, na. rm = TRUE),
30 Quantile_75 = quantile(Marks, 0.75, na. rm = TRUE)
31 )
32 print(summary_stats)
33
34 # Create a bar chart
35 ggplot(data, aes (X = Category)) +
36 geom_bar (fill = "skyblue', color "black) +
37 labs(title = "Distribution of Student Marks",
38 X = "Category",
39 y "Number of Students") +
40 theme_minimal ()
41
42
> # Read the Excel file
> data <- read_excel("data.xlsx", sheet = "Sheet1")
New names:
-> 1

> # Convert Category column to a factor


> datasCategory <- as.factor (datasCategory)

> # Summary statistics


> summary_stats <- data %>% summarize(
Mean = mean(Marks, na. rm = TRUE)
Medi an = medi an (Marks, na. rm = TRUE)
Mode = as.numeric(names (sort(table (Marks), decreasing = TRUE) [1])),
Standard_Deviation = sd(Marks,na.rm = TRUE),
Variance = var (Marks, na. rm TRUE),
Min = min(Marks, na.rm = TRUE)
Max = max (Marks,na. = TRUE),
Range = max (Marks,na. rm = TRUE) min(Marks, na. rm = TRUE),
IQR = IQR (Marks,na.rm = TRUE)
e1071: :skewness (Marks, na. rm = TRUE)
e1071::kurtos is (Marks, na. rm = TRUE),
Coefficient_of_Variati on = sd(Marks,na. rm = TRUE) / mean (Marks, na. rm = TRUE),
Quantile_25 = quantile (Marks, 0.25, na. rm = TRUE),
Quantile_75 = quantile (Marks, 0.75, na. rm = TRUE)
+ )
> print(s ummary_stats)
# A tibble: 1 x 14
Mean Median Mode Standard_Devi ation Variance Min Max Range IQR
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <db l> <db l> <db l>
69.7 68 48 17.0 287. 42 99 29
# :
i5 more variables e1071: :skewness (Marks, na. rm = TRUE) <dbl>,
57

e1071: :kurtosis (Marks, na. rm = TRUE) <dbl>, Coefficient_of_Variation <dbl>,


Quantile_25 <dbl>, Quantile_75 <dbl>

> # Create a bar chart


> ggplot(data, aes (x = Category)) +
geom_bar (fill = "skyblue", color "black'") +
labs (title = "Distribution of Student Marks",
+ X = "Category",
+ y = "Number of Students ") +
+ theme_minimal (O
Console Terminal x Background Jobs

R R 44.1 ~

intersect, setdiff, setequal, union

Warning message:
package dplyr' was built under R version 4.4.2

> # Read the Excel file


> data <- read excel("data. xlsx",sheet = "Sheeti")
New names:
->...1

> # Convert Category column to a factor


> dataSCategory <- as.factor (datasCategory)

> # Summary statistics


> Summary stats <- data summarize( %%
Mean = mean (Marks,na. rm = TRUE),
Medi an =
median (Marks,na. rm = TRUE),
Standard _Deviation =
sd(Marks, na. rm = TRUE),
Min = min (Marks, na. rm TRUE) =
Max = max (Marks, na. rm = TRUE)
+
> print (summary_stats)
A tibble: 1 x 5
Mean Median Standard_ Deviation Min Max
<dbl> <dbl> <db l> <dbl> <dbl>
1 69.7 68 17.0 42 99

Create a bar chart


#

> ggplot (data, aes (x = Category)) +


geom_bar (fi1l = "skyblue",color = "black") +
labs (title = "Distribution of Student Marks",
X = "Category",
y = "Number of Students") +
+ thememinima1)
> source("E:/project T/R Studio/data set.R")
New names:
->...1
# A tibble:1 x 5

Mean Medi an Standard_Deviation Min Max


<dbl> <db1> <dbl> <dbl> <db l>
1 69.7 68 17.0 42 99
Coding:
install.packages("e1071")

install.packages("dplyr")

# Load necessary libraries

library(readxl)

library(ggplot2)

library(dplyr)

# Read the Excel file

data <- read_excel("data.xlsx", sheet = "Sheet1")

# Convert Category column to a factor

data$Category <- as.factor(data$Category)

# Summary statistics

summary_stats <- data %>% summarize(

Mean = mean(Marks, na.rm = TRUE),

Median = median(Marks, na.rm = TRUE),

Mode = as.numeric(names(sort(table(Marks), decreasing = TRUE)[1])),

Standard_Deviation = sd(Marks, na.rm = TRUE),

Variance = var(Marks, na.rm = TRUE),

Min = min(Marks, na.rm = TRUE),

Max = max(Marks, na.rm = TRUE),

Range = max(Marks, na.rm = TRUE) - min(Marks, na.rm = TRUE),

IQR = IQR(Marks, na.rm = TRUE),


e1071::skewness(Marks, na.rm = TRUE),

e1071::kurtosis(Marks, na.rm = TRUE),

Coefficient_of_Variation = sd(Marks, na.rm = TRUE) / mean(Marks, na.rm = TRUE),

Quantile_25 = quantile(Marks, 0.25, na.rm = TRUE),

Quantile_75 = quantile(Marks, 0.75, na.rm = TRUE)

print(summary_stats)

# Create a bar chart

ggplot(data, aes(x = Category)) +

geom_bar(fill = "skyblue", color = "black") +

labs(title = "Distribution of Student Marks",

x = "Category",

y = "Number of Students") +

theme_minimal()

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy