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:0025.5736
2026-01-01 01:00:0025.9999
2026-01-01 02:00:0028.2694
2026-01-01 03:00:0028.7336
2026-01-01 04:00:0028.9030
2026-01-01 05:00:0029.3615
2026-01-01 06:00:0029.3993
2026-01-01 07:00:0029.5448
2026-01-01 08:00:0028.8398
2026-01-01 09:00:0028.8078
2026-01-01 10:00:0027.1869
2026-01-01 11:00:0026.8432
2026-01-01 12:00:0026.6935
2026-01-01 13:00:0026.6625
2026-01-01 14:00:0025.7074
2026-01-01 15:00:0025.2287
2026-01-01 16:00:0025.3756
2026-01-01 17:00:0024.9245
2026-01-01 18:00:0024.9074
2026-01-01 19:00:0025.1288
2026-01-01 20:00:0025.0224
2026-01-01 21:00:0024.8483
2026-01-01 22:00:0025.8336
2026-01-01 23:00:0025.8691

Computed Descriptive Statistics

Measure Value
Sample Size24
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
Skewness0.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

  1. Ensure the "stats" project folder exists.
  2. Installs these additional packages at once: e1071 (for skewness and kurtosis), dplyr (for data manipulation), and readr (for reading CSV files), once per project:
  3. >
    install.packages(c("e1071", "dplyr", "readr"))
  4. Download the CSV file (2026-01-01_DUM.csv) and place it inside the "stats" folder.
  5. Create a new R script in RStudio:
    • Click File → New File → R Script
    • Save the script as descriptive_stats.R inside the "stats" folder
  6. Copy the R code to compute descriptive statistics into descriptive_stats.R.
  7. Save the script and click Source (top right of the script editor) to run all commands, or issue the command:
  8. >
    source("descriptive_stats.R")
  9. Check the Console for the printed table of descriptive statistics.
  10. Optional: Snapshot the environment for reproducibility:
    >
    renv::snapshot()

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:

Raw Hourly Data & Z-Score Report

Time (UTC) Temperature (°C) Z-Score Interpretation
00:0025.57-0.74Typical
01:0026.00-0.48Typical
02:0028.270.86Typical
03:0028.731.13Beyond 1 SD
04:0028.901.23Beyond 1 SD
05:0029.361.50Beyond 1 SD
06:0029.401.53Beyond 1 SD
07:0029.541.61Beyond 1 SD
08:0028.841.19Beyond 1 SD
09:0028.811.18Beyond 1 SD
10:0027.190.22Typical
11:0026.840.01Near Mean
12:0026.69-0.08Typical
13:0026.66-0.09Typical
14:0025.71-0.66Typical
15:0025.23-0.94Typical
16:0025.38-0.85Typical
17:0024.92-1.12Beyond 1 SD
18:0024.91-1.13Beyond 1 SD
19:0025.13-1.00Typical
20:0025.02-1.06Beyond 1 SD
21:0024.85-1.17Beyond 1 SD
22:0025.83-0.58Typical
23:0025.87-0.56Typical

Summary of Key Descriptive Measures

MeasureValueDefinition/Insight
Mean26.82 °CArithmetic average of the day.
Median26.33 °CThe middle temperature value.
SD1.69 °CAverage distance from the mean.
Skewness0.43Slight positive skew (tail on the right).
Kurtosis-1.55Platykurtic (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.

How to Verify:

  1. Open your preferred file in Microsoft Excel or LibreOffice Calc.
  2. Locate the Descriptive Statistics and Shape Analysis sections.
  3. Verify that the =SKEW() and =KURT() results match the R script's type = 2 outputs exactly.

Note: LibreOffice is a free, open-source alternative available at the official download site.


References