Pupil-teacher ratio, lower secondary

Source: worldbank.org, 03.09.2025

Year: 2017

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 33.6 +3.14% 6
Albania Albania 10.1 -6.4% 76
Austria Austria 7.73 -0.792% 95
Azerbaijan Azerbaijan 6.56 -5.42% 99
Burundi Burundi 54.3 +32.4% 1
Belgium Belgium 8.69 -1.91% 86
Burkina Faso Burkina Faso 23.3 -6.49% 17
Bangladesh Bangladesh 36.7 -10.6% 3
Bulgaria Bulgaria 12.7 -1.63% 59
Bahrain Bahrain 11 +3.79% 71
Bahamas Bahamas 14.8 +12.9% 47
Bosnia & Herzegovina Bosnia & Herzegovina 8.75 -4.52% 85
Belarus Belarus 8.24 +0.729% 90
Belize Belize 17.1 -11.2% 36
Brazil Brazil 17.6 +0.646% 32
Barbados Barbados 21.3 -1.74% 24
Brunei Brunei 10.1 +1.16% 77
Bhutan Bhutan 12.9 -4.32% 58
Switzerland Switzerland 8.42 +1.63% 89
Chile Chile 18.3 -4.65% 31
China China 12.3 -0.246% 61
Colombia Colombia 26.4 +0.616% 11
Comoros Comoros 6.04 -42.8% 101
Cape Verde Cape Verde 15.9 -4.01% 41
Costa Rica Costa Rica 13.4 +4.7% 56
Cuba Cuba 9.73 -0.14% 79
Cyprus Cyprus 8.95 +11.4% 82
Germany Germany 11.1 +1.18% 70
Djibouti Djibouti 28.7 -0.751% 8
Ecuador Ecuador 22.8 -3.73% 19
Egypt Egypt 17.1 +1.22% 38
Eritrea Eritrea 40.3 -2.25% 2
Spain Spain 11.9 -0.228% 63
Estonia Estonia 8.64 +1.69% 87
Finland Finland 8.93 -0.777% 83
United Kingdom United Kingdom 17.4 +13.7% 33
Georgia Georgia 7.55 +1.95% 96
Ghana Ghana 13.4 -10.4% 53
Gibraltar Gibraltar 15.5 -13.6% 42
Gambia Gambia 22.5 -4.36% 20
Greece Greece 7.8 +1.43% 93
Grenada Grenada 11.8 -0.92% 64
Guatemala Guatemala 12.3 -13.9% 62
Honduras Honduras 18.7 +2.18% 30
Indonesia Indonesia 15.2 +9.34% 44
India India 25.9 -4.1% 13
Iran Iran 21.3 +1.13% 23
Italy Italy 10.2 +0.0452% 75
Jordan Jordan 13 -31.2% 57
Japan Japan 12.3 -0.962% 60
Cambodia Cambodia 20.7 +1.47% 26
Kiribati Kiribati 14.9 -14.8% 46
South Korea South Korea 13.6 -4.31% 52
Laos Laos 17.3 -3.1% 34
Liberia Liberia 14.6 -10.4% 49
St. Lucia St. Lucia 11.5 -0.712% 65
Liechtenstein Liechtenstein 5.6 -0.583% 103
Sri Lanka Sri Lanka 17.1 +0.425% 37
Lithuania Lithuania 7.45 +0.35% 98
Latvia Latvia 7.48 +1.79% 97
Macao SAR China Macao SAR China 10.9 -0.551% 72
Morocco Morocco 23.9 +20.1% 16
Monaco Monaco 10.4 +6.54% 74
Moldova Moldova 9.6 +5.84% 80
Madagascar Madagascar 20.7 -15.8% 25
Maldives Maldives 5.93 -6.17% 102
Mexico Mexico 19.7 -1.89% 28
North Macedonia North Macedonia 7.78 -4.76% 94
Mali Mali 20.2 -20.3% 27
Malta Malta 6.43 -4.26% 100
Myanmar (Burma) Myanmar (Burma) 28.4 +11.7% 9
Namibia Namibia 25.9 +5.2% 12
Niger Niger 34.7 +13.8% 4
Netherlands Netherlands 13.8 -0.176% 51
Norway Norway 7.97 -5.4% 91
Nepal Nepal 34 -2.61% 5
New Zealand New Zealand 15 +1.22% 45
Oman Oman 10.1 -36.1% 78
Pakistan Pakistan 15.4 -12.5% 43
Panama Panama 14.7 +0.674% 48
Philippines Philippines 24.2 +2.67% 15
Poland Poland 8.64 -0.808% 88
Portugal Portugal 9.54 +0.548% 81
Palestinian Territories Palestinian Territories 21.6 +1.96% 22
Qatar Qatar 11.2 +2.53% 67
Romania Romania 11.2 +0.0308% 68
Rwanda Rwanda 23.3 +3.16% 18
Saudi Arabia Saudi Arabia 11.1 +3.73% 69
Solomon Islands Solomon Islands 16.2 -10.9% 40
Sierra Leone Sierra Leone 21.9 +4.83% 21
El Salvador El Salvador 28.9 -2.3% 7
Serbia Serbia 7.97 -2.26% 92
São Tomé & Príncipe São Tomé & Príncipe 19.2 -20.8% 29
Suriname Suriname 13.4 +7.35% 55
Slovakia Slovakia 10.9 +0.382% 73
Sweden Sweden 11.3 -1.3% 66
Thailand Thailand 25.3 +0.0001% 14
Timor-Leste Timor-Leste 27.7 +9.51% 10
Tunisia Tunisia 13.4 -11.4% 54
Turkey Turkey 17.1 -3.94% 35
United States United States 14.5 -1.11% 50
Uzbekistan Uzbekistan 8.77 -0.201% 84
Vietnam Vietnam 16.8 +2.73% 39

The pupil-teacher ratio (PTR) at the lower secondary education level serves as a crucial indicator of educational quality and accessibility. It reflects the average number of students per teacher within a specific educational level, providing valuable insights into the learning environment. A balanced ratio can signify that teachers have manageable classroom sizes, enabling them to provide more tailored support to each student. Conversely, a high ratio may indicate overcrowded classrooms, which could hinder individualized instruction and learning outcomes.

Understanding the pupil-teacher ratio is paramount for several reasons. Firstly, it influences the overall quality of education received by students. Teachers with fewer students can engage more effectively, allowing for better student participation and individualized attention. A favorable PTR is often associated with higher student achievement, lower dropout rates, and improved overall educational outcomes. A ratio that is too high may overwhelm teachers, leading to burnout and reduced job satisfaction, which consequently can affect student motivation and outcomes.

The significance of the pupil-teacher ratio extends beyond classroom dynamics. It serves as a fundamental relationship indicator to other metrics of educational effectiveness, such as student enrollment rates, graduation rates, and educational attainment. When examining educational systems, a lower PTR correlates with better educational outcomes. Research demonstrates that in nations where teacher-student ratios are favorable, the quality of learning experiences is typically higher, and students generally have more significant achievements in standardized assessments.

Several factors are at play concerning the pupil-teacher ratio. One primary factor is economic resources available for education. Wealthier nations often have the financial capacity to hire more teachers, maintain smaller class sizes, and invest in educational infrastructures. Conversely, developing countries may struggle with insufficient funding, leading to higher PTRs. Additionally, societal values and policies affect hiring practices in education. In societies where educational attainment is prioritized, there may be a greater push for lower ratios to enhance student outcomes. Conversely, regions facing political instability or conflict may see the opposite, with increased teacher shortages directly impacting the ease and quality of education.

Global trends reveal a gradual shift in pupil-teacher ratios over the years. For instance, from 1993 to 2019, global data shows a slow but noticeable decline in PTR across the board. The median value in 2019 was 21.53 students per teacher, up from 17.34 in 1993. The slow increase may indicate multiple underlying issues ranging from increased enrollment rates without a corresponding increase in the number of teachers to educational funding challenges in various nations. Such trends call for the need for strategic interventions to manage PTR effectively.

Various strategies may be implemented to address pupil-teacher ratio challenges. Governments and educational authorities could consider increasing teacher recruitment efforts, including incentives for teachers in high-demand areas or regions with challenging economic conditions. Additionally, policies aimed at improving professional development for current educators can enhance teacher effectiveness and alleviate some challenges posed by high PTRs. Flexible teaching methods, such as team teaching or the use of digital platforms for supplemental education, can also help accommodate greater class sizes while maintaining educational quality.

Solutions to improve pupil-teacher ratios may also include investing in technology to support learning in larger classrooms. The integration of blended learning and digital tools can facilitate individualized learning experiences even in crowded classrooms. Furthermore, community involvement can help in addressing the PTR, through local educational initiatives that may provide support for teachers or introduce volunteer programs aimed at mentoring students.

Despite all these strategies and potential solutions, flaws exist concerning the ideal pupil-teacher ratio. For instance, an emphasis on lowering the ratio might lead to significant financial strains on educational budgets that could divert funds from other pressing educational needs. Investing too heavily in hiring might detract from teacher training, professional development, or infrastructure improvements that may also enhance educational quality. Thus, a holistic approach is necessary when tackling issues surrounding pupil-teacher ratios, considering various dimensions of educational quality beyond mere numbers.

Looking at specific data points from 2019, the top areas for pupil-teacher ratios included Nepal (31.99), Djibouti (29.96), Ghana (13.1), and Monaco (7.29). In contrast, the bottom regions featured Monaco again with a favorable ratio of just 7.29 students per teacher, showing they have high educational capacity, while Ghana and Djibouti reflect greater struggles with ratios near the higher end of the scale. This indicates a disparity in educational quality and access across regions, particularly that wealthier nations, like Monaco, can afford lower ratios, promoting more significant teaching effectiveness and subsequently better student outcomes.

Ultimately, the pupil-teacher ratio at the lower secondary education level provides a lens through which we can evaluate educational access and quality. By understanding its implications, influences, and associated trends, education policymakers and stakeholders can work effectively towards creating a more equitable and effective educational landscape.

                    
# Install missing packages
import sys
import subprocess

def install(package):
subprocess.check_call([sys.executable, "-m", "pip", "install", package])

# Required packages
for package in ['wbdata', 'country_converter']:
try:
__import__(package)
except ImportError:
install(package)

# Import libraries
import wbdata
import country_converter as coco
from datetime import datetime

# Define World Bank indicator code
dataset_code = 'SE.SEC.ENRL.LO.TC.ZS'

# Download data from World Bank API
data = wbdata.get_dataframe({dataset_code: 'value'},
date=(datetime(1960, 1, 1), datetime.today()),
parse_dates=True,
keep_levels=True).reset_index()

# Extract year
data['year'] = data['date'].dt.year

# Convert country names to ISO codes using country_converter
cc = coco.CountryConverter()
data['iso2c'] = cc.convert(names=data['country'], to='ISO2', not_found=None)
data['iso3c'] = cc.convert(names=data['country'], to='ISO3', not_found=None)

# Filter out rows where ISO codes could not be matched — likely not real countries
data = data[data['iso2c'].notna() & data['iso3c'].notna()]

# Sort for calculation
data = data.sort_values(['iso3c', 'year'])

# Calculate YoY absolute and percent change
data['value_change'] = data.groupby('iso3c')['value'].diff()
data['value_change_percent'] = data.groupby('iso3c')['value'].pct_change() * 100

# Calculate ranks (higher GDP per capita = better rank)
data['rank'] = data.groupby('year')['value'].rank(ascending=False, method='dense')

# Calculate rank change from previous year
data['rank_change'] = data.groupby('iso3c')['rank'].diff()

# Select desired columns
final_df = data[['country', 'iso2c', 'iso3c', 'year', 'value',
'value_change', 'value_change_percent', 'rank', 'rank_change']].copy()

# Optional: Add labels as metadata (could be useful for export or UI)
column_labels = {
'country': 'Country name',
'iso2c': 'ISO 2-letter country code',
'iso3c': 'ISO 3-letter country code',
'year': 'Year',
'value': 'GDP per capita (current US$)',
'value_change': 'Year-over-Year change in value',
'value_change_percent': 'Year-over-Year percent change in value',
'rank': 'Country rank by GDP per capita (higher = richer)',
'rank_change': 'Change in rank from previous year'
}

# Display first few rows
print(final_df.head(10))

# Optional: Save to CSV
#final_df.to_csv("gdp_per_capita_cleaned.csv", index=False)
                    
                
                    
# Check and install required packages
required_packages <- c("WDI", "countrycode", "dplyr")

for (pkg in required_packages) {
  if (!requireNamespace(pkg, quietly = TRUE)) {
    install.packages(pkg)
  }
}

# Load the necessary libraries
library(WDI)
library(dplyr)
library(countrycode)

# Define the dataset code (World Bank indicator code)
dataset_code <- 'SE.SEC.ENRL.LO.TC.ZS'

# Download data using WDI package
dat <- WDI(indicator = dataset_code)

# Filter only countries using 'is_country' from countrycode
# This uses iso2c to identify whether the entry is a recognized country
dat <- dat %>%
  filter(countrycode(iso2c, origin = 'iso2c', destination = 'country.name', warn = FALSE) %in%
           countrycode::codelist$country.name.en)

# Ensure dataset is ordered by country and year
dat <- dat %>%
  arrange(iso3c, year)

# Rename the dataset_code column to "value" for easier manipulation
dat <- dat %>%
  rename(value = !!dataset_code)

# Calculate year-over-year (YoY) change and percentage change
dat <- dat %>%
  group_by(iso3c) %>%
  mutate(
    value_change = value - lag(value),                              # Absolute change from previous year
    value_change_percent = 100 * (value - lag(value)) / lag(value) # Percent change from previous year
  ) %>%
  ungroup()

# Calculate rank by year (higher value => higher rank)
dat <- dat %>%
  group_by(year) %>%
  mutate(rank = dense_rank(desc(value))) %>% # Rank countries by descending value
  ungroup()

# Calculate rank change (positive = moved up, negative = moved down)
dat <- dat %>%
  group_by(iso3c) %>%
  mutate(rank_change = rank - lag(rank)) %>% # Change in rank compared to previous year
  ungroup()

# Select and reorder final columns
final_data <- dat %>%
  select(
    country,
    iso2c,
    iso3c,
    year,
    value,
    value_change,
    value_change_percent,
    rank,
    rank_change
  )

# Add labels (variable descriptions)
attr(final_data$country, "label") <- "Country name"
attr(final_data$iso2c, "label") <- "ISO 2-letter country code"
attr(final_data$iso3c, "label") <- "ISO 3-letter country code"
attr(final_data$year, "label") <- "Year"
attr(final_data$value, "label") <- "GDP per capita (current US$)"
attr(final_data$value_change, "label") <- "Year-over-Year change in value"
attr(final_data$value_change_percent, "label") <- "Year-over-Year percent change in value"
attr(final_data$rank, "label") <- "Country rank by GDP per capita (higher = richer)"
attr(final_data$rank_change, "label") <- "Change in rank from previous year"

# Print the first few rows of the final dataset
print(head(final_data, 10))