Class SocialMobilityMatrix

java.lang.Object
org.episteme.social.sociology.SocialMobilityMatrix

public final class SocialMobilityMatrix extends Object
Models social mobility between classes using Markov chain transition matrices. Provides tools to project future class distributions and analyze mobility metrics.
Since:
1.0
Version:
1.1
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • projectClassDistribution

      public static Real[] projectClassDistribution(Real[] initialDistribution, Real[][] transitionMatrix, int generations)
      Projects the class distribution after a specified number of generations. Formula: P_future = P_current * M^n
      Parameters:
      initialDistribution - Array representing initial population percentages in each class
      transitionMatrix - Square matrix where M[i][j] is probability of moving from class i to class j
      generations - Number of time steps to project
      Returns:
      Array representing the future class distribution
      Throws:
      IllegalArgumentException - if matrix dimensions do not match distribution
    • mobilityIndex

      public static Real mobilityIndex(Real[][] matrix)
      Calculates the mobility index (Prais Index) of a transition matrix.

      Index M = (n - trace(P)) / (n - 1)

      Where trace(P) is the sum of diagonal elements (stayers). 0 implies perfect immobility (identity matrix). 1 implies perfect mobility (random chance, essentially).
      Parameters:
      matrix - the transition matrix
      Returns:
      the mobility index
    • findEquilibrium

      public static Real[] findEquilibrium(Real[][] matrix)
      Finds the equilibrium class distribution (Steady State) of the matrix. Iterates until convergence (simplified numerical approach).
      Parameters:
      matrix - the transition matrix
      Returns:
      the equilibrium distribution array