title: “Abhiram Yalavarthy” output: html_document

#This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.

#Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Ctrl+Shift+Enter.

#The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.

adult <- read.csv(“C:/Users/abhir/OneDrive/Documents/adult.data”,header=FALSE) str(adult)

summary(adult$V4)

# Numeric summary for V5 summary(adult$V5)

Numeric summary for V9

summary(adult$V9)

Categorical summary for unique values and counts in V5

cat_summary_V5 <- table(adult$V5) cat_summary_V5

Categorical summary for unique values and counts in V9

cat_summary_V9 <- table(adult$V9) cat_summary_V9

Summary statistics for V1

summary(adult$V1)

Summary statistics for V13

summary(adult$V13)

Visualization of the distribution for V4

hist(adult$V3, main = “Histogram of V3”, xlab = “V3”)

Visualization of the distribution for V5

hist(adult$V5, main = “Histogram of V5”, xlab = “V5”)



library(ggplot2)

# Scatter Plot for V4 and V9
scatter_plot <- ggplot(adult, aes(x = V4, y = V9)) +
  geom_point(color = "blue") +
  labs(title = "Scatter Plot of Columns V4 and V9",
       x = "V4", y = "V9")

print(scatter_plot)



# Histogram for V3
histogram_V3 <- ggplot(adult, aes(x = V3)) +
  geom_histogram(fill = "purple", color = "black", bins = 30) +
  labs(title = "Histogram of Column V3",
       x = "V3", y = "Frequency")

# Histogram for V5
histogram_V5 <- ggplot(adult, aes(x = V5)) +
  geom_histogram(fill = "orange", color = "black", bins = 30) +
  labs(title = "Histogram of Column V5",
       x = "V5", y = "Frequency")

# Print both histograms
print(histogram_V3)
print(histogram_V5)

library(ggplot2)

Line Plot for Trend between V3 and V9

line_plot <- ggplot(adult, aes(x = V3, y = V9)) + geom_line(color = “red”) + labs(title = “Trend Line Plot of Columns V3 and V9”, x = “V3”, y = “V9”)

print(line_plot)