docstr: ...Test exponential random numbers simulation
          
docstr_tok: ["...","Test","exponential","random","numbers","simulation"]
code: def test_exponential_random(self):
      """...Test exponential random numbers simulation"""
      intensity = 1.576
  
      seeded_sample = [
          0.1537587,
          0.2700092,
          0.4705855,
          0.0381418,
          1.1485296,
      ]
  
      self._test_dist_with_seed(
          seeded_sample, test_exponential, intensity
      )
  
      # Statistical tests
      # We test the null hypothesis that the sample is drawn
      # from an exponential distribution with scale = 1 / intensity.
      # We use Kolmogorov–Smirnov test.
      # The p-value should strongly support null hypothesis, with value larger than .90;
      # the KS statisticcs should be small
      # For comparison notice the following example
      """
          >>> stats.kstest('expon', 'expon')
          KStestResult(statistic=0.09904815307706938, pvalue=0.9782788116515602)
          """
  
      sample = test_exponential(
          intensity, self.stat_size, self.test_seed
      )
      p_threshold = 0.025
      ks_threshold = 0.15
      ks_stat, p = stats.kstest(sample, "expon", (0, 1.0 / intensity))
      self.assertLess(
          ks_stat,
          ks_threshold,
          "Exponential random number generation: "
          "stat of Kolmogorov-Smirnov test is "
          "larger than threshold. "
          f"stat: {ks_stat}; "
          f"threshold: {ks_threshold}; "
          f"KS test p-value: {p}.",
      )
      self.assertGreater(
          p,
          p_threshold,
          "Exponential random number generation: "
          "p-value of Kolmogorov-Smirnov test is "
          "smaller than threshold. "
          f"p-value: {p}; "
          f"threshold: {p_threshold}; "
          f"KS test statistics: {ks_stat}.",
      )
  
imports: import unittest
  import multiprocessing
  from multiprocessing.pool import Pool
  import itertools
  import numpy
  import threading
  from scipy import stats
  from tick.random import test_uniform, test_gaussian, test_poisson, test_exponential, test_uniform_int, test_discrete, test_uniform_threaded
label_desc: Use image node_id 9 for calling the Test obj's underlying member method code with example usage: obj.test_exponential_random() without return types