Statistics

R script for Student’s t-test:

---
title: "Litra vs. Obols"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)

library(tidyverse)

# load himera and syracuse
hime <- readxl::read_xlsx("~/Desktop/Himera.xlsx")
syra <- readxl::read_xlsx("~/Desktop/Syracuse.xlsx")
```

```{r himera, include = F}
# variance test
# different variances between litra and obols
hime_var <- var.test(hime$`Litrai of Himera`, hime$`Obols of Himera`)

# paired samples t-test
paired_t_him <- t.test(hime$`Litrai of Himera`, hime$`Obols of Himera`, var.equal = F, paired = T)

ind_t_him <- t.test(hime$`Litrai of Himera`, hime$`Obols of Himera`, var.equal = F, paired = F)

```

### Boxplot of Himera
```{r box_him, include = T}
boxplot(hime)
```

### Himera variance is not equal b/w litra and obols
```{r var_him, include= T}
hime_var
```

### Paired t-test himera
```{r him_paired, include = T}
paired_t_him
```

### Independent t-test himera
```{r him_ind, include = T}
ind_t_him
```

```{r syracuse, include=T}

# Variance is TRUE
syra_var <- var.test(syra$`Litrai of Syracuse`, syra$`Obols of Syracuse`)

# paired samples t-test
paired_t_syra <- t.test(syra$`Litrai of Syracuse`, syra$`Obols of Syracuse`, var.equal = T, paired = T)
ind_t_syra <- t.test(syra$`Litrai of Syracuse`, syra$`Obols of Syracuse`, var.equal = T, paired = F)
```


### Boxplot of syra
```{r box_syra, include = T}
boxplot(syra)
```

### Syra variance is true (litra vs. obol)
```{r var_syra, include= T}
syra_var
```


### Syra paired samples t-test
```{r syra_paired, include = T}
paired_t_syra
```


### Syra independent samples t-test
```{r syra_ind, include = T}
ind_t_syra
```


### boxplot of all
```{r syra_him, include= T}
data <- readxl::read_xlsx("~/Desktop/Himera and Syracuse.xlsx")

table(data$mint, data$denomination)

boxplot(data = data, weight ~ mint * denomination)
```