Dumaguete City Temperature – Descriptive Statistics
This page shows the hourly temperature in Dumaguete City on January 1, 2026 in UTC (Hersbach et al., 2023). The data is typical of local conditions and will be used to demonstrate standard descriptive statistics.
Raw Data (Hourly Temperature, °C)
| Valid Time (UTC) | Temperature (°C) |
|---|---|
| 2026-01-01 00:00:00 | 25.5736 |
| 2026-01-01 01:00:00 | 25.9999 |
| 2026-01-01 02:00:00 | 28.2694 |
| 2026-01-01 03:00:00 | 28.7336 |
| 2026-01-01 04:00:00 | 28.9030 |
| 2026-01-01 05:00:00 | 29.3615 |
| 2026-01-01 06:00:00 | 29.3993 |
| 2026-01-01 07:00:00 | 29.5448 |
| 2026-01-01 08:00:00 | 28.8398 |
| 2026-01-01 09:00:00 | 28.8078 |
| 2026-01-01 10:00:00 | 27.1869 |
| 2026-01-01 11:00:00 | 26.8432 |
| 2026-01-01 12:00:00 | 26.6935 |
| 2026-01-01 13:00:00 | 26.6625 |
| 2026-01-01 14:00:00 | 25.7074 |
| 2026-01-01 15:00:00 | 25.2287 |
| 2026-01-01 16:00:00 | 25.3756 |
| 2026-01-01 17:00:00 | 24.9245 |
| 2026-01-01 18:00:00 | 24.9074 |
| 2026-01-01 19:00:00 | 25.1288 |
| 2026-01-01 20:00:00 | 25.0224 |
| 2026-01-01 21:00:00 | 24.8483 |
| 2026-01-01 22:00:00 | 25.8336 |
| 2026-01-01 23:00:00 | 25.8691 |
Computed Descriptive Statistics
| Measure | Value |
|---|---|
| Sample Size | 24 |
| Mean (°C) | 26.82 |
| Maximum (°C) | 29.54 |
| Minimum (°C) | 24.85 |
| Median (°C) | 26.33 |
| Range (°C) | 4.7 |
| Sample Standard Deviation (°C) | 1.69 |
| Variance (°C²) | 2.87 |
| Mean Absolute Deviation (°C) | 1.47 |
| 25th Inclusive Percentile, Q1 (°C) | 25.23 |
| 75th Inclusive Percentile, Q3 (°C) | 28.75 |
| Interquartile Range, IQR (°C) | 3.41 |
| 90th Percentile (°C) | 29.22 |
| 99th Percentile (°C) | 29.51 |
| Skewness | 0.43 |
| Kurtosis (Fisher, normal = 0) | -1.55 |
| Coefficient of Variation (CV) | 0.063 |
| Z-scores (first 5) | -0.74, -0.48, 0.86, 1.13, 1.23, … |
Note: These measures are part of standard descriptive statistics (Green et al., 2022; Navarro & Foxcroft, 2025).
R Code to Compute Descriptive Statistics
# START
#=============================================
# Filename: descriptive_stats.R
# Purpose: Small-sample descriptive statistics
#=============================================
#------------------------------
# Load necessary packages
#------------------------------
library(dplyr) # For data cleaning, filtering, and piping (%>%)
library(readr) # For fast, consistent reading of rectangular data (like CSVs)
library(e1071) # For moments (skew/kurtosis) and various machine learning tools
#------------------------------
# Read CSV data
#------------------------------
# Place your CSV file in the working directory or specify full path
temp_data <- read_csv("2026-01-01_DUM.csv")
# View first few rows to confirm
print(head(temp_data))
#------------------------------
# Extract temperature vector
#------------------------------
temps <- temp_data$t2m_C # column with hourly temperatures
#------------------------------
# Basic statistics
#------------------------------
n <- length(temps) # sample size
mean_val <- mean(temps) # mean
max_val <- max(temps) # maximum
min_val <- min(temps) # minimum
median_val <- median(temps) # median
range_val <- max_val - min_val # range
sd_val <- sd(temps) # sample standard deviation
var_val <- var(temps) # sample variance
mad_val <- mean(abs(temps - mean_val)) # mean absolute deviation
#------------------------------
# Percentiles (inclusive, small sample)
#------------------------------
q1 <- quantile(temps, 0.25, type = 7) # 25th percentile (inclusive)
q3 <- quantile(temps, 0.75, type = 7) # 75th percentile (inclusive)
iqr_val <- IQR(temps) # interquartile range
p90 <- quantile(temps, 0.90, type = 7) # 90th percentile
p99 <- quantile(temps, 0.99, type = 7) # 99th percentile
#------------------------------
# Skewness and Kurtosis
#------------------------------
# Using e1071 package:
# type = 2: Bias-corrected for small samples.
# This matches Excel/LibreOffice SKEW() and KURT() functions.
# For small samples (n < 50), this provides a more accurate estimate of the population.
skew <- e1071::skewness(temps, type = 2) # Matches Excel SKEW() (Symmetry: 0 = symmetric)
kurt <- e1071::kurtosis(temps, type = 2) # Matches Excel KURT() (Excess Kurtosis: 0 = normal)
#------------------------------
# Coefficient of Variation
#------------------------------
cv <- sd_val / mean_val # SD standardized by mean
#------------------------------
# Z-scores
#------------------------------
z_scores <- (temps - mean_val) / sd_val
#------------------------------
# Summary table
#------------------------------
summary_table <- data.frame(
Measure = c(
"Sample Size", "Mean (°C)", "Maximum (°C)", "Minimum (°C)",
"Median (°C)", "Range (°C)", "Sample SD (°C)", "Variance (°C²)",
"Mean Absolute Deviation (°C)", "25th inclusive percentile, Q1 (°C)",
"75th inclusive percentile, Q3 (°C)", "Interquartile Range (°C)",
"90th percentile (°C)", "99th percentile (°C)", "Skewness (type=2, e1071)",
"Kurtosis (Fisher, type=2, e1071)", "Coefficient of Variation (CV)"
),
Value = c(
n, round(mean_val,2), round(max_val,2), round(min_val,2),
round(median_val,2), round(range_val,2), round(sd_val,2), round(var_val,2),
round(mad_val,2), round(q1,2), round(q3,2),
round(iqr_val,2), round(p90,2), round(p99,2),
round(skew,2), round(kurt,2), round(cv,3)
)
)
#------------------------------
# Print summary table
#------------------------------
cat("\n=== Descriptive Statistics Summary ===\n")
print(summary_table)
#------------------------------
# Print Full 24-Hour Z-score Report
#------------------------------
cat("\n=== 24-Hour Temperature Stability Report ===\n")
# Create the full table using all rows (n)
z_table_full <- data.frame(
"Hour" = temp_data$valid_time,
"Temp_C" = temp_data$t2m_C,
"Z_score" = round(as.numeric(z_scores), 2)
)
# Print the entire table
# We use print.data.frame to ensure all 24 rows show up in the console
print(z_table_full, row.names = FALSE)
cat("\n(Analysis complete for all", nrow(temp_data), "hours)\n")
# END
RStudio Workflow to Compute Descriptive Statistics
- Ensure the "stats" project folder exists.
- Installs these additional packages at once:
e1071(for skewness and kurtosis),dplyr(for data manipulation), andreadr(for reading CSV files), once per project: - Download the CSV file (2026-01-01_DUM.csv) and place it inside the "stats" folder.
- Create a new R script in RStudio:
- Click File → New File → R Script
- Save the script as
descriptive_stats.Rinside the "stats" folder
- Copy the R code to compute descriptive statistics into
descriptive_stats.R. - Save the script and click Source (top right of the script editor) to run all commands, or issue the command:
- Check the Console for the printed table of descriptive statistics.
- Optional: Snapshot the environment for reproducibility:
>
renv::snapshot()
>
install.packages(c("e1071", "dplyr", "readr"))
>
source("descriptive_stats.R")
The Significance of Z-Scores
It is important to understand the Z-score. A Z-score tells us how far a specific temperature is from the daily average in terms of standard deviations.
How to Interpret Z-Scores:
- Z = 0: The temperature is exactly the daily mean.
- Z > 1.0 or Z < -1.0: The temperature is relatively high or low for that day (beyond 1 standard deviation).
- Z > 3.0 or Z < -3.0: This indicates a statistical outlier, representing an extreme weather deviation.
Raw Hourly Data & Z-Score Report
| Time (UTC) | Temperature (°C) | Z-Score | Interpretation |
|---|---|---|---|
| 00:00 | 25.57 | -0.74 | Typical |
| 01:00 | 26.00 | -0.48 | Typical |
| 02:00 | 28.27 | 0.86 | Typical |
| 03:00 | 28.73 | 1.13 | Beyond 1 SD |
| 04:00 | 28.90 | 1.23 | Beyond 1 SD |
| 05:00 | 29.36 | 1.50 | Beyond 1 SD |
| 06:00 | 29.40 | 1.53 | Beyond 1 SD |
| 07:00 | 29.54 | 1.61 | Beyond 1 SD |
| 08:00 | 28.84 | 1.19 | Beyond 1 SD |
| 09:00 | 28.81 | 1.18 | Beyond 1 SD |
| 10:00 | 27.19 | 0.22 | Typical |
| 11:00 | 26.84 | 0.01 | Near Mean |
| 12:00 | 26.69 | -0.08 | Typical |
| 13:00 | 26.66 | -0.09 | Typical |
| 14:00 | 25.71 | -0.66 | Typical |
| 15:00 | 25.23 | -0.94 | Typical |
| 16:00 | 25.38 | -0.85 | Typical |
| 17:00 | 24.92 | -1.12 | Beyond 1 SD |
| 18:00 | 24.91 | -1.13 | Beyond 1 SD |
| 19:00 | 25.13 | -1.00 | Typical |
| 20:00 | 25.02 | -1.06 | Beyond 1 SD |
| 21:00 | 24.85 | -1.17 | Beyond 1 SD |
| 22:00 | 25.83 | -0.58 | Typical |
| 23:00 | 25.87 | -0.56 | Typical |
Summary of Key Descriptive Measures
| Measure | Value | Definition/Insight |
|---|---|---|
| Mean | 26.82 °C | Arithmetic average of the day. |
| Median | 26.33 °C | The middle temperature value. |
| SD | 1.69 °C | Average distance from the mean. |
| Skewness | 0.43 | Slight positive skew (tail on the right). |
| Kurtosis | -1.55 | Platykurtic (Flatter peak than normal). |
Statistical Validation Files
To confirm the statistical accuracy of the R script, you can compare the outputs against these pre-configured spreadsheets. Both files contain the same data and calculations.
- Option A (Excel): Download 2026-01-01_DUM.xlsx
- Option B (LibreOffice): Download 2026-01-01_DUM.ods
How to Verify:
- Open your preferred file in Microsoft Excel or LibreOffice Calc.
- Locate the Descriptive Statistics and Shape Analysis sections.
- Verify that the
=SKEW()and=KURT()results match the R script'stype = 2outputs exactly.
Note: LibreOffice is a free, open-source alternative available at the official download site.
References
- Green, J. L., Manski, S. E., Hansen, T. A., & Broatch, J. E. (2022). Descriptive statistics. In Elsevier eBooks (pp. 723–733). https://doi.org/10.1016/b978-0-12-818630-5.10083-1
- Hersbach, H., Bell, B., Berrisford, P., Biavati, G., Horányi, A., Muñoz Sabater, J., Nicolas, J., Peubey, C., Radu, R., Rozum, I., Schepers, D., Simmons, A., Soci, C., Dee, D., & Thépaut, J.-N. (2023). ERA5 hourly data on single levels from 1940 to present [Data set]. Copernicus Climate Data Store (CDS). https://doi.org/10.24381/cds.adbb2d47
- Navarro, D., & Foxcroft, D. (2025). 4. Descriptive statistics. In Open Book Publishers (pp. 59–80). https://doi.org/10.11647/obp.0333.04