Part1

library(ggplot2)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(tidyr)
x_value <- seq(-5, 5, .150)
normal_dist <- data.frame(x = x_value, y = dnorm(x_value))
t_2 <- data.frame(x = x_value, y = dt(x_value, df = 2))
t_5 <- data.frame(x = x_value, y = dt(x_value, df = 5))
t_15 <- data.frame(x = x_value, y = dt(x_value, df = 15))
t_30 <- data.frame(x = x_value, y = dt(x_value, df = 30))
t_120 <- data.frame(x = x_value, y = dt(x_value, df = 120))
combined_data <- bind_rows(
  data.frame(distribution = "Normal", normal_dist),
  data.frame(distribution = "t (df = 2)", t_2),
  data.frame(distribution = "t (df = 5)", t_5),
  data.frame(distribution = "t (df = 15)", t_15),
  data.frame(distribution = "t (df = 30)", t_30),
  data.frame(distribution = "t (df = 120)", t_120)
)
ggplot(data = combined_data, mapping = aes(x = x, y = y, color = distribution)) +
  geom_line(size = 1,linetype = ifelse(test = combined_data$distribution == "Normal",yes = "solid",no = "solid")) +
  labs(title = "Normal Distributions",x = "Value",y = "Density") +
  theme_minimal()
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## i Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.

Part 2

set.seed(123)
mu <- 108
sigma <- 7.2
data_values <- rnorm(n = 1000,   mean = mu,  sd = sigma   ) 
normal_data_2 <- data.frame(x = data_values)
z_scores <- (data_values - mu) / sigma
z_scores_data <- data.frame(x = z_scores)
ggplot(data = normal_data_2, 
       mapping = aes(x = x,)) +
  geom_histogram()
## 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

ggplot(data = z_scores_data, 
       mapping = aes(x = x,)) +
  geom_histogram()
## 
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

normal_2 <- data.frame(x = data_values, y = dnorm(data_values, mean = 108, sd = 7.2))
z_score_2 <- data.frame(x = z_scores, y = dnorm(z_scores, mean = 0, sd = 1))
combined_data_2 <-  bind_rows(
  data.frame(distribution = "Normal Random Values", normal_2),
  data.frame(distribution = "z-scores", z_score_2))
ggplot(normal_2, mapping = aes (x = x, y=y, col= 'red'))+
  geom_line()

ggplot(z_score_2, mapping = aes (x = x, y=y, ))+
  geom_line()

Two graph are same.The two charts have the same distributional Bell shape.

Part 3 P value is a mesure of the probability of results when Null hypothesis is true.