class_docstr: Eight Schools model.
  
  The eight schools problem [1, 2] considers the effectiveness of SAT
  coaching programs conducted in parallel at eight schools. It has become a
  classic problem that illustrates the usefulness of hierarchical modeling for
  sharing information between exchangeable groups.
  
  For each of the eight schools we have an estimated treatment effect
  and a standard error of the effect estimate. The treatment effects in the
  study were obtained by a linear regression on the treatment group using
  PSAT-M and PSAT-V scores as control variables.
  
  ```python
  num_schools = 8
  treatment_effects = np.array([28, 8, -3, 7, -1, 1, 18, 12], dtype=np.float32)
  treatment_stddevs = np.array(
    [15, 10, 16, 11, 9, 11, 10, 18], dtype=np.float32)
  ```
  
  This model encodes a partial pooling of these effects towards a global
  estimated `avg_effect`. The strength of the pooling is determined by a
  `log_stddev` variable, which is itself inferred.
  
  ```none
  avg_effect ~ Normal(loc=0, scale=10)
  log_stddev ~ Normal(loc=5, scale=1)
  for i in range(8):
    school_effects[i] ~ Normal(loc=avg_effect, scale=exp(log_stddev))
    treatment_effects[i] ~ Normal(loc=school_effects[i],
                                  scale=treatment_stddevs[i])
  ```
  
  #### References
  
  [1] Donald B. Rubin. Estimation in parallel randomized experiments.
      _Journal of Educational Statistics_, 6(4):377-401, 1981.
  [2] Andrew Gelman, John Carlin, Hal Stern, David Dunson, Aki Vehtari, and
      Donald Rubin. Bayesian Data Analysis, Third Edition.
      Chapman and Hall/CRC, 2013.
class_docstr_tok: ["Eight","Schools","model",".","The","eight","schools","problem","[","1",",","2","]","considers","the","effectiveness","of","SAT","coaching","programs","conducted","in","parallel","at","eight","schools",".","It","has","become","a","classic","problem","that","illustrates","the","usefulness","of","hierarchical","modeling","for","sharing","information","between","exchangeable","groups",".","For","each","of","the","eight","schools","we","have","an","estimated","treatment","effect","and","a","standard","error","of","the","effect","estimate",".","The","treatment","effects","in","the","study","were","obtained","by","a","linear","regression","on","the","treatment","group","using","PSAT-M","and","PSAT-V","scores","as","control","variables",".","``","`","python","num_schools","=","8","treatment_effects","=","np.array","(","[","28",",","8",",","-3",",","7",",","-1",",","1",",","18",",","12","]",",","dtype=np.float32",")","treatment_stddevs","=","np.array","(","[","15",",","10",",","16",",","11",",","9",",","11",",","10",",","18","]",",","dtype=np.float32",")","``","`","This","model","encodes","a","partial","pooling","of","these","effects","towards","a","global","estimated","`","avg_effect","`",".","The","strength","of","the","pooling","is","determined","by","a","`","log_stddev","`","variable",",","which","is","itself","inferred",".","``","`","none","avg_effect","~","Normal","(","loc=0",",","scale=10",")","log_stddev","~","Normal","(","loc=5",",","scale=1",")","for","i","in","range","(","8",")",":","school_effects","[","i","]","~","Normal","(","loc=avg_effect",",","scale=exp","(","log_stddev",")",")","treatment_effects","[","i","]","~","Normal","(","loc=school_effects","[","i","]",",","scale=treatment_stddevs","[","i","]",")","``","`","#","#","#","#","References","[","1","]","Donald","B.","Rubin",".","Estimation","in","parallel","randomized","experiments",".","_Journal","of","Educational","Statistics_",",","6","(","4",")",":377-401",",","1981",".","[","2","]","Andrew","Gelman",",","John","Carlin",",","Hal","Stern",",","David","Dunson",",","Aki","Vehtari",",","and","Donald","Rubin",".","Bayesian","Data","Analysis",",","Third","Edition",".","Chapman","and","Hall\/CRC",",","2013","."]
code: def _prior_distribution(self):
      return self._prior_dist
  
file_path: probability/spinoffs/inference_gym/inference_gym/targets/eight_schools.py
imports: import tensorflow.compat.v2
  import tensorflow_probability
  from tensorflow_probability.python.internal import prefer_static
  from inference_gym.targets import bayesian_model
  from inference_gym.targets import model
  from inference_gym.targets.ground_truth import eight_schools
label_desc: Use image node_id 2 for calling the EightSchools obj's underlying member method code with example usage: obj._prior_distribution() and returns: self