Analysis (Intuition)

The dice roll is believed to be [not fair]/[fair] because it is not normally distributed.

The distribution observed in the plot appears to be a right-skewed distribution because it is skewed to the right.

library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.4.1      ✔ purrr   0.3.5 
## ✔ tibble  3.1.8      ✔ dplyr   1.0.10
## ✔ tidyr   1.2.1      ✔ stringr 1.5.0 
## ✔ readr   2.1.3      ✔ forcats 0.5.2 
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(readr)
data <- read_csv("/Users/mex/2023 Session/data.3.csv")
## Rows: 29034 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (8): roll 1, roll 2, roll 3, roll 4, roll 5, roll 6, roll 7, roll 8
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
spec(data)
## cols(
##   `roll 1` = col_double(),
##   `roll 2` = col_double(),
##   `roll 3` = col_double(),
##   `roll 4` = col_double(),
##   `roll 5` = col_double(),
##   `roll 6` = col_double(),
##   `roll 7` = col_double(),
##   `roll 8` = col_double()
## )
freq = array(12)
for(i in 1:8){
 freq[i] = 0
}
for(row in 1:nrow(data)){
  count = 0
  for(n in data[row,]){
    for(i in n){
      if(n<4)
        count = count + 1
    }
  }
  freq[count] = freq[count] + 1
}

matrix(
  freq,
  nrow = 1,
  byrow = TRUE,
  dimnames = list(
    c("successes "),
    c(1:8)
  )
)
##               1    2    3    4    5   6  7 8
## successes  5718 8495 7531 4017 1301 251 39 1
plot(freq, bty="o", main = "Number of successes when rolling a 10 sided dice in groups of 8",ylab="count",xlab=" Number of successes")