Class SurveyAnalyzer

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

public final class SurveyAnalyzer extends Object
Utility class for analyzing social survey data, providing statistical methods such as weighted averages to account for demographic sampling bias.
Since:
1.0
Version:
1.1
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • weightedMean

      public static Real weightedMean(double[] responses, double[] weights)
      Calculates the weighted arithmetic mean of a set of responses. Useful for correcting sample imbalances where certain groups are over- or under-represented.
      Parameters:
      responses - array of numerical response values
      weights - array of corresponding weights for each response
      Returns:
      the weighted mean
      Throws:
      IllegalArgumentException - if arrays are null, conform to different lengths, or are empty