This file is indexed.

/usr/lib/python2.7/dist-packages/openturns/stattests.py is in python-openturns 1.5-7build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.




"""
Statistical tests.
"""


from sys import version_info
if version_info >= (2,6,0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_stattests', [dirname(__file__)])
        except ImportError:
            import _stattests
            return _stattests
        if fp is not None:
            try:
                _mod = imp.load_module('_stattests', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _stattests = swig_import_helper()
    del swig_import_helper
else:
    import _stattests
del version_info
try:
    _swig_property = property
except NameError:
    pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
    if (name == "thisown"): return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name,None)
    if method: return method(self,value)
    if (not static):
        self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)

def _swig_setattr(self,class_type,name,value):
    return _swig_setattr_nondynamic(self,class_type,name,value,0)

def _swig_getattr(self,class_type,name):
    if (name == "thisown"): return self.this.own()
    method = class_type.__swig_getmethods__.get(name,None)
    if method: return method(self)
    raise AttributeError(name)

def _swig_repr(self):
    try: strthis = "proxy of " + self.this.__repr__()
    except: strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

try:
    _object = object
    _newclass = 1
except AttributeError:
    class _object : pass
    _newclass = 0


class SwigPyIterator(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _stattests.delete_SwigPyIterator
    __del__ = lambda self : None;
    def value(self): return _stattests.SwigPyIterator_value(self)
    def incr(self, n=1): return _stattests.SwigPyIterator_incr(self, n)
    def decr(self, n=1): return _stattests.SwigPyIterator_decr(self, n)
    def distance(self, *args): return _stattests.SwigPyIterator_distance(self, *args)
    def equal(self, *args): return _stattests.SwigPyIterator_equal(self, *args)
    def copy(self): return _stattests.SwigPyIterator_copy(self)
    def next(self): return _stattests.SwigPyIterator_next(self)
    def __next__(self): return _stattests.SwigPyIterator___next__(self)
    def previous(self): return _stattests.SwigPyIterator_previous(self)
    def advance(self, *args): return _stattests.SwigPyIterator_advance(self, *args)
    def __eq__(self, *args): return _stattests.SwigPyIterator___eq__(self, *args)
    def __ne__(self, *args): return _stattests.SwigPyIterator___ne__(self, *args)
    def __iadd__(self, *args): return _stattests.SwigPyIterator___iadd__(self, *args)
    def __isub__(self, *args): return _stattests.SwigPyIterator___isub__(self, *args)
    def __add__(self, *args): return _stattests.SwigPyIterator___add__(self, *args)
    def __sub__(self, *args): return _stattests.SwigPyIterator___sub__(self, *args)
    def __iter__(self): return self
SwigPyIterator_swigregister = _stattests.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)

GCC_VERSION = _stattests.GCC_VERSION
class TestFailed:
    """TestFailed is used to raise an uniform exception in tests."""

    __type = "TestFailed"

    def __init__(self, reason=""):
        self.reason = reason

    def type(self):
        return TestFailed.__type

    def what(self):
        return self.reason

    def __str__(self):
        return TestFailed.__type + ": " + self.reason

    def __lshift__(self, ch):
        self.reason += ch
        return self

import openturns.base
import openturns.common
import openturns.wrapper
import openturns.typ
import openturns.statistics
import openturns.graph
import openturns.func
import openturns.geom
import openturns.diff
import openturns.optim
import openturns.solver
import openturns.algo
import openturns.experiment
import openturns.model_copula
class VisualTest(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, VisualTest, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, VisualTest, name)
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_getmethods__["DrawEmpiricalCDF"] = lambda x: _stattests.VisualTest_DrawEmpiricalCDF
    if _newclass:DrawEmpiricalCDF = staticmethod(_stattests.VisualTest_DrawEmpiricalCDF)
    __swig_getmethods__["DrawHistogram"] = lambda x: _stattests.VisualTest_DrawHistogram
    if _newclass:DrawHistogram = staticmethod(_stattests.VisualTest_DrawHistogram)
    def DrawQQplot(*args):
        """
        Draw a QQ-plot as an OpenTURNS :class:`~openturns.Graph`.

        Parameters
        ----------
        sample : :class:`~openturns.NumericalSample`
            Tested sample.
        tested_quantity : :class:`~openturns.Distribution` or :class:`~openturns.NumericalSample`
            Tested model or sample.
        n_points : int, if `tested_quantity` is a :class:`~openturns.NumericalSample`
            The number of points that is used for interpolating the empirical CDF of
            the two samples (with possibly different sizes).

            It will default to `DistributionImplementation-DefaultPointNumber` from
            the :class:`~openturns.ResourceMap`.

        Notes
        -----
        The QQ-plot is a visual fitting test for univariate distributions. It
        opposes the sample quantiles to those of the tested quantity (either a
        distribution or another sample) by plotting the following points could:

        .. math::

            \\left(x^{(i)},
                  \\bullet\\left[\\widehat{F}\\left(x^{(i)}\\right)\\right]
            \\right), \\quad i = 1, \\ldots, m

        where :math:`\\widehat{F}` denotes the empirical CDF of the (first) tested
        sample and :math:`\\bullet` denotes either the quantile function of the tested
        distribution or the empirical quantile function of the second tested sample.

        If the given sample fits to the tested distribution or sample, then the points
        should be close to be aligned (up to the uncertainty associated with the
        estimation of the empirical probabilities) with the **first bissector**  whose
        equation reads:

        .. math::

            y = x, \\quad x \\in \\Rset

        Examples
        --------
        >>> import openturns as ot
        >>> from openturns.viewer import View

        Generate a random sample from a Normal distribution:

        >>> ot.RandomGenerator.SetSeed(0)
        >>> distribution = ot.Weibull(2., .5)
        >>> sample = distribution.getSample(30)
        >>> sample.setDescription(['Sample'])

        Draw a QQ-plot against a given (inferred) distribution:

        >>> tested_distribution = ot.WeibullFactory().build(sample)
        >>> QQ_plot = ot.VisualTest_DrawQQplot(sample, tested_distribution)
        >>> View(QQ_plot).show()

        Draw a two-sample QQ-plot:

        >>> another_sample = distribution.getSample(50)
        >>> another_sample.setDescription(['Another sample'])
        >>> QQ_plot = ot.VisualTest_DrawQQplot(sample, another_sample)
        >>> View(QQ_plot).show()
        """
        return _stattests.VisualTest_DrawQQplot(*args)

    if _newclass:DrawQQplot = staticmethod(DrawQQplot)
    __swig_getmethods__["DrawQQplot"] = lambda x: DrawQQplot
    def DrawHenryLine(*args):
        """
        Draw an Henry plot as an OpenTURNS :class:`~openturns.Graph`.

        Parameters
        ----------
        sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
            Tested (univariate) sample.
        normal_distribution : :class:`~openturns.Normal`, optional
            Tested (univariate) normal distribution.

            If not given, this will build a :class:`~openturns.Normal` distribution
            from the given sample using the :class:`~openturns.NormalFactory`.

        Notes
        -----
        The Henry plot is a visual fitting test for the normal distribution. It
        opposes the sample quantiles to those of the standard normal distribution
        (the one with zero mean and unit variance) by plotting the following points
        could:

        .. math::

            \\left(x^{(i)},
                  \\Phi^{-1}\\left[\\widehat{F}\\left(x^{(i)}\\right)\\right]
            \\right), \\quad i = 1, \\ldots, m

        where :math:`\\widehat{F}` denotes the empirical CDF of the sample and
        :math:`\\Phi^{-1}` denotes the quantile function of the standard normal
        distribution.

        If the given sample fits to the tested normal distribution (with mean
        :math:`\\mu` and standard deviation :math:`\\sigma`), then the points should be
        close to be aligned (up to the uncertainty associated with the estimation
        of the empirical probabilities) on the **Henry line** whose equation reads:

        .. math::

            y = \\frac{x - \\mu}{\\sigma}, \\quad x \\in \\Rset

        The Henry plot is a special case of the more general QQ-plot.

        See Also
        --------
        VisualTest_DrawQQplot, FittingTest_Kolmogorov

        Examples
        --------
        >>> import openturns as ot
        >>> from openturns.viewer import View

        Generate a random sample from a Normal distribution:

        >>> ot.RandomGenerator.SetSeed(0)
        >>> distribution = ot.Normal(2., .5)
        >>> sample = distribution.getSample(30)

        Draw an Henry plot against a given (wrong) Normal distribution:

        >>> henry_graph = ot.VisualTest_DrawHenryLine(sample, distribution)
        >>> henry_graph.setTitle('Henry plot against given %s' % ot.Normal(3., 1.))
        >>> View(henry_graph).show()

        Draw an Henry plot against an inferred Normal distribution:

        >>> henry_graph = ot.VisualTest_DrawHenryLine(sample)
        >>> henry_graph.setTitle('Henry plot against inferred Normal distribution')
        >>> View(henry_graph).show()
        """
        return _stattests.VisualTest_DrawHenryLine(*args)

    if _newclass:DrawHenryLine = staticmethod(DrawHenryLine)
    __swig_getmethods__["DrawHenryLine"] = lambda x: DrawHenryLine
    __swig_getmethods__["DrawClouds"] = lambda x: _stattests.VisualTest_DrawClouds
    if _newclass:DrawClouds = staticmethod(_stattests.VisualTest_DrawClouds)
    __swig_getmethods__["DrawLinearModel"] = lambda x: _stattests.VisualTest_DrawLinearModel
    if _newclass:DrawLinearModel = staticmethod(_stattests.VisualTest_DrawLinearModel)
    __swig_getmethods__["DrawLinearModelResidual"] = lambda x: _stattests.VisualTest_DrawLinearModelResidual
    if _newclass:DrawLinearModelResidual = staticmethod(_stattests.VisualTest_DrawLinearModelResidual)
    __swig_getmethods__["DrawCobWeb"] = lambda x: _stattests.VisualTest_DrawCobWeb
    if _newclass:DrawCobWeb = staticmethod(_stattests.VisualTest_DrawCobWeb)
    __swig_getmethods__["DrawKendallPlot"] = lambda x: _stattests.VisualTest_DrawKendallPlot
    if _newclass:DrawKendallPlot = staticmethod(_stattests.VisualTest_DrawKendallPlot)
    __swig_destroy__ = _stattests.delete_VisualTest
    __del__ = lambda self : None;
VisualTest_swigregister = _stattests.VisualTest_swigregister
VisualTest_swigregister(VisualTest)

def VisualTest_DrawEmpiricalCDF(*args):
  return _stattests.VisualTest_DrawEmpiricalCDF(*args)
VisualTest_DrawEmpiricalCDF = _stattests.VisualTest_DrawEmpiricalCDF

def VisualTest_DrawHistogram(*args):
  return _stattests.VisualTest_DrawHistogram(*args)
VisualTest_DrawHistogram = _stattests.VisualTest_DrawHistogram

def VisualTest_DrawQQplot(*args):
  """
    Draw a QQ-plot as an OpenTURNS :class:`~openturns.Graph`.

    Parameters
    ----------
    sample : :class:`~openturns.NumericalSample`
        Tested sample.
    tested_quantity : :class:`~openturns.Distribution` or :class:`~openturns.NumericalSample`
        Tested model or sample.
    n_points : int, if `tested_quantity` is a :class:`~openturns.NumericalSample`
        The number of points that is used for interpolating the empirical CDF of
        the two samples (with possibly different sizes).

        It will default to `DistributionImplementation-DefaultPointNumber` from
        the :class:`~openturns.ResourceMap`.

    Notes
    -----
    The QQ-plot is a visual fitting test for univariate distributions. It
    opposes the sample quantiles to those of the tested quantity (either a
    distribution or another sample) by plotting the following points could:

    .. math::

        \\left(x^{(i)},
              \\bullet\\left[\\widehat{F}\\left(x^{(i)}\\right)\\right]
        \\right), \\quad i = 1, \\ldots, m

    where :math:`\\widehat{F}` denotes the empirical CDF of the (first) tested
    sample and :math:`\\bullet` denotes either the quantile function of the tested
    distribution or the empirical quantile function of the second tested sample.

    If the given sample fits to the tested distribution or sample, then the points
    should be close to be aligned (up to the uncertainty associated with the
    estimation of the empirical probabilities) with the **first bissector**  whose
    equation reads:

    .. math::

        y = x, \\quad x \\in \\Rset

    Examples
    --------
    >>> import openturns as ot
    >>> from openturns.viewer import View

    Generate a random sample from a Normal distribution:

    >>> ot.RandomGenerator.SetSeed(0)
    >>> distribution = ot.Weibull(2., .5)
    >>> sample = distribution.getSample(30)
    >>> sample.setDescription(['Sample'])

    Draw a QQ-plot against a given (inferred) distribution:

    >>> tested_distribution = ot.WeibullFactory().build(sample)
    >>> QQ_plot = ot.VisualTest_DrawQQplot(sample, tested_distribution)
    >>> View(QQ_plot).show()

    Draw a two-sample QQ-plot:

    >>> another_sample = distribution.getSample(50)
    >>> another_sample.setDescription(['Another sample'])
    >>> QQ_plot = ot.VisualTest_DrawQQplot(sample, another_sample)
    >>> View(QQ_plot).show()
    """
  return _stattests.VisualTest_DrawQQplot(*args)

def VisualTest_DrawHenryLine(*args):
  """
    Draw an Henry plot as an OpenTURNS :class:`~openturns.Graph`.

    Parameters
    ----------
    sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
        Tested (univariate) sample.
    normal_distribution : :class:`~openturns.Normal`, optional
        Tested (univariate) normal distribution.

        If not given, this will build a :class:`~openturns.Normal` distribution
        from the given sample using the :class:`~openturns.NormalFactory`.

    Notes
    -----
    The Henry plot is a visual fitting test for the normal distribution. It
    opposes the sample quantiles to those of the standard normal distribution
    (the one with zero mean and unit variance) by plotting the following points
    could:

    .. math::

        \\left(x^{(i)},
              \\Phi^{-1}\\left[\\widehat{F}\\left(x^{(i)}\\right)\\right]
        \\right), \\quad i = 1, \\ldots, m

    where :math:`\\widehat{F}` denotes the empirical CDF of the sample and
    :math:`\\Phi^{-1}` denotes the quantile function of the standard normal
    distribution.

    If the given sample fits to the tested normal distribution (with mean
    :math:`\\mu` and standard deviation :math:`\\sigma`), then the points should be
    close to be aligned (up to the uncertainty associated with the estimation
    of the empirical probabilities) on the **Henry line** whose equation reads:

    .. math::

        y = \\frac{x - \\mu}{\\sigma}, \\quad x \\in \\Rset

    The Henry plot is a special case of the more general QQ-plot.

    See Also
    --------
    VisualTest_DrawQQplot, FittingTest_Kolmogorov

    Examples
    --------
    >>> import openturns as ot
    >>> from openturns.viewer import View

    Generate a random sample from a Normal distribution:

    >>> ot.RandomGenerator.SetSeed(0)
    >>> distribution = ot.Normal(2., .5)
    >>> sample = distribution.getSample(30)

    Draw an Henry plot against a given (wrong) Normal distribution:

    >>> henry_graph = ot.VisualTest_DrawHenryLine(sample, distribution)
    >>> henry_graph.setTitle('Henry plot against given %s' % ot.Normal(3., 1.))
    >>> View(henry_graph).show()

    Draw an Henry plot against an inferred Normal distribution:

    >>> henry_graph = ot.VisualTest_DrawHenryLine(sample)
    >>> henry_graph.setTitle('Henry plot against inferred Normal distribution')
    >>> View(henry_graph).show()
    """
  return _stattests.VisualTest_DrawHenryLine(*args)

def VisualTest_DrawClouds(*args):
  return _stattests.VisualTest_DrawClouds(*args)
VisualTest_DrawClouds = _stattests.VisualTest_DrawClouds

def VisualTest_DrawLinearModel(*args):
  return _stattests.VisualTest_DrawLinearModel(*args)
VisualTest_DrawLinearModel = _stattests.VisualTest_DrawLinearModel

def VisualTest_DrawLinearModelResidual(*args):
  return _stattests.VisualTest_DrawLinearModelResidual(*args)
VisualTest_DrawLinearModelResidual = _stattests.VisualTest_DrawLinearModelResidual

def VisualTest_DrawCobWeb(*args):
  return _stattests.VisualTest_DrawCobWeb(*args)
VisualTest_DrawCobWeb = _stattests.VisualTest_DrawCobWeb

def VisualTest_DrawKendallPlot(*args):
  return _stattests.VisualTest_DrawKendallPlot(*args)
VisualTest_DrawKendallPlot = _stattests.VisualTest_DrawKendallPlot

class FittingTest(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, FittingTest, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, FittingTest, name)
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    def BestModelBIC(*args):
        """
        Select the best model according to the Bayesian information criterion.

        Parameters
        ----------
        sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
            Tested sample.
        models : list of :class:`~openturns.Distribution` or :class:`~openturns.DistributionFactory`
            Tested distributions.

        Returns
        -------
        best_model : :class:`~openturns.Distribution`
            The best distribution for the sample according to Bayesian information
            criterion.
            This may raise a warning if the best model does not perform well.

        See Also
        --------
        FittingTest_BIC

        Examples
        --------
        >>> import openturns as ot
        >>> ot.RandomGenerator.SetSeed(0)
        >>> distribution = ot.Normal()
        >>> sample = distribution.getSample(30)
        >>> tested_distributions = [ot.ExponentialFactory(), ot.NormalFactory()]
        >>> best_model = ot.FittingTest_BestModelBIC(sample, tested_distributions)
        >>> print(best_model)
        Normal(mu = -0.0944924, sigma = 0.989808)
        """
        return _stattests.FittingTest_BestModelBIC(*args)

    if _newclass:BestModelBIC = staticmethod(BestModelBIC)
    __swig_getmethods__["BestModelBIC"] = lambda x: BestModelBIC
    def BestModelKolmogorov(*args):
        """
        Select the best model according to the Kolmogorov goodness-of-fit test.

        Parameters
        ----------
        sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
            Tested sample.
        models : list of :class:`~openturns.Distribution` or :class:`~openturns.DistributionFactory`
            Tested distributions.

        Returns
        -------
        best_model : :class:`~openturns.Distribution`
            The best distribution for the sample according to Bayesian information
            criterion.
            This may raise a warning if the best model does not perform well.
        best_result : :class:`~openturns.TestResult`
            Best test result.

        See Also
        --------
        FittingTest_Kolmogorov

        Examples
        --------
        >>> import openturns as ot
        >>> ot.RandomGenerator.SetSeed(0)
        >>> distribution = ot.Normal()
        >>> sample = distribution.getSample(30)
        >>> tested_distributions = [ot.ExponentialFactory(), ot.NormalFactory()]
        >>> best_model, best_result = ot.FittingTest_BestModelKolmogorov(sample, tested_distributions)
        >>> print(best_model)
        Normal(mu = -0.0944924, sigma = 0.989808)
        """
        return _stattests.FittingTest_BestModelKolmogorov(*args)

    if _newclass:BestModelKolmogorov = staticmethod(BestModelKolmogorov)
    __swig_getmethods__["BestModelKolmogorov"] = lambda x: BestModelKolmogorov
    def BestModelChiSquared(*args):
        """
        Select the best model according to the :math:`\\chi^2` goodness-of-fit test.

        Parameters
        ----------
        sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
            Tested sample.
        models : list of :class:`~openturns.Distribution` or :class:`~openturns.DistributionFactory`
            Tested distributions.

        Returns
        -------
        best_model : :class:`~openturns.Distribution`
            The best distribution for the sample according to Bayesian information
            criterion.
            This may raise a warning if the best model does not perform well.
        best_result : :class:`~openturns.TestResult`
            Best test result.

        See Also
        --------
        FittingTest_ChiSquared

        Examples
        --------
        >>> import openturns as ot
        >>> ot.RandomGenerator.SetSeed(0)
        >>> distribution = ot.Poisson()
        >>> sample = distribution.getSample(30)
        >>> tested_distributions = [ot.PoissonFactory(), ot.UserDefinedFactory()]
        >>> best_model = ot.FittingTest_BestModelBIC(sample, tested_distributions)
        >>> print(best_model)
        Poisson(lambda = 1.06667)
        """
        return _stattests.FittingTest_BestModelChiSquared(*args)

    if _newclass:BestModelChiSquared = staticmethod(BestModelChiSquared)
    __swig_getmethods__["BestModelChiSquared"] = lambda x: BestModelChiSquared
    def BIC(*args):
        """
        Compute the Bayesian information criterion.

        Parameters
        ----------
        sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
            Tested sample.
        model : :class:`~openturns.Distribution` or :class:`~openturns.DistributionFactory`
            Tested distribution.
        n_parameters : int, :math:`0 \\leq k`, optional
            The number of parameters in the distribution that have been estimated from
            the sample.
            This parameter must not be provided if a :class:`~openturns.DistributionFactory`
            was provided as the second argument (it will internally be set to the
            number of parameters estimated by the :class:`~openturns.DistributionFactory`).
            It can be specified if  a :class:`~openturns.Distribution` was provided
            as the second argument, but if it is not, it will be set equal to 0.

        Returns
        -------
        BIC : float
            The Bayesian information criterion.

        Notes
        -----
        The Bayesian information criterion is defined as follows:

        .. math::

            {\\rm BIC} = \\frac{1}{m}
                        \\left(- 2 \\log L(\\vect{x}^{(i)}, i = 1, \\ldots, m)
                              + k \\log m\\right)

        where :math:`\\log L` denotes the log-likelihood of the sample with respect to
        the given distribution, and :math:`k` denotes the number of estimated
        parameters in the distribution.

        This is used for model selection.

        Examples
        --------
        >>> import openturns as ot
        >>> ot.RandomGenerator.SetSeed(0)
        >>> distribution = ot.Normal()
        >>> sample = distribution.getSample(30)
        >>> ot.FittingTest_BIC(sample, distribution)
        2.7938693005063415
        >>> ot.FittingTest_BIC(sample, distribution, 2)
        3.0206157926171517
        >>> ot.FittingTest_BIC(sample, ot.NormalFactory())
        3.0108025506670955
        """
        return _stattests.FittingTest_BIC(*args)

    if _newclass:BIC = staticmethod(BIC)
    __swig_getmethods__["BIC"] = lambda x: BIC
    def Kolmogorov(*args):
        """
        Perform a Kolmogorov goodness-of-fit test for 1-d continuous distributions.

        Parameters
        ----------
        sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
            Tested sample.
        model : :class:`~openturns.Distribution` or :class:`~openturns.DistributionFactory`
            Tested distribution.
        level : float, :math:`0 \\leq {\\rm level} \\leq 1`, optional
            This is the value such that :math:`\\alpha = 1 - {\\rm level}` is the risk of
            committing a Type I error, that is an incorrect rejection of a true
            null hypothesis.
        n_parameters : int, :math:`0 \\leq k`, optional
            The number of parameters in the distribution that have been estimated from
            the sample.
            This parameter must not be provided if a :class:`~openturns.DistributionFactory`
            was provided as the second argument (it will internally be set to the
            number of parameters estimated by the :class:`~openturns.DistributionFactory`).
            It can be specified if  a :class:`~openturns.Distribution` was provided
            as the second argument, but if it is not, it will be set equal to 0.

        Returns
        -------
        test_result : :class:`~openturns.TestResult`
            Test result.

        Raises
        ------
        TypeError : If the distribution is not continuous or if the sample is
            multivariate.

        Notes
        -----
        The present implementation of the Kolmogorov goodness-of-fit test is
        two-sided. This uses an external C implementation of the Kolmogorov cumulative
        distribution function by [Simard2010]_.

        Examples
        --------
        >>> import openturns as ot
        >>> ot.RandomGenerator.SetSeed(0)
        >>> distribution = ot.Normal()
        >>> sample = distribution.getSample(30)
        >>> ot.FittingTest_Kolmogorov(sample, ot.NormalFactory(), .99)
        class=TestResult name=Unnamed type=KolmogorovDistribution binaryQualityMeasure=true p-value threshold=0.01 p-value=0.846896 description=[Normal(mu = -0.0944924, sigma = 0.989808) vs sample Normal]
        """
        return _stattests.FittingTest_Kolmogorov(*args)

    if _newclass:Kolmogorov = staticmethod(Kolmogorov)
    __swig_getmethods__["Kolmogorov"] = lambda x: Kolmogorov
    def ChiSquared(*args):
        """
        Perform a :math:`\\chi^2` goodness-of-fit test for 1-d discrete distributions.

        Parameters
        ----------
        sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
            Tested sample.
        model : :class:`~openturns.Distribution` or :class:`~openturns.DistributionFactory`
            Tested distribution.
        level : float, :math:`0 \\leq {\\rm level} \\leq 1`, optional
            This the value such that :math:`\\alpha = 1 - {\\rm level}` is the risk of
            committing a Type I error, that is an incorrect rejection of a true
            null hypothesis.
        n_parameters : int, :math:`0 \\leq k`, optional
            The number of parameters in the distribution that have been estimated from
            the sample.
            This parameter must not be provided if a :class:`~openturns.DistributionFactory`
            was provided as the second argument (it will internally be set to the
            number of parameters estimated by the :class:`~openturns.DistributionFactory`).
            It can be specified if  a :class:`~openturns.Distribution` was provided
            as the second argument, but if it is not, it will be set equal to 0.

        Returns
        -------
        test_result : :class:`~openturns.TestResult`
            Test result.

        Raises
        ------
        TypeError : If the distribution is not discrete or if the sample is
            multivariate.

        Notes
        -----
        This is an interface to the `chisq.test function from the
        'stats' R package <http://stat.ethz.ch/R-manual/R-patched/library/stats/html/chisq.test.html>`_.

        Examples
        --------
        >>> import openturns as ot
        >>> ot.RandomGenerator.SetSeed(0)
        >>> distribution = ot.Poisson()
        >>> sample = distribution.getSample(30)
        >>> ot.FittingTest_ChiSquared(sample, ot.PoissonFactory(), .99)
        class=TestResult name=Unnamed type=ChiSquaredPoisson binaryQualityMeasure=true p-value threshold=0.01 p-value=0.606136 description=[]
        """
        return _stattests.FittingTest_ChiSquared(*args)

    if _newclass:ChiSquared = staticmethod(ChiSquared)
    __swig_getmethods__["ChiSquared"] = lambda x: ChiSquared
    __swig_destroy__ = _stattests.delete_FittingTest
    __del__ = lambda self : None;
FittingTest_swigregister = _stattests.FittingTest_swigregister
FittingTest_swigregister(FittingTest)

def FittingTest_BestModelBIC(*args):
  """
    Select the best model according to the Bayesian information criterion.

    Parameters
    ----------
    sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
        Tested sample.
    models : list of :class:`~openturns.Distribution` or :class:`~openturns.DistributionFactory`
        Tested distributions.

    Returns
    -------
    best_model : :class:`~openturns.Distribution`
        The best distribution for the sample according to Bayesian information
        criterion.
        This may raise a warning if the best model does not perform well.

    See Also
    --------
    FittingTest_BIC

    Examples
    --------
    >>> import openturns as ot
    >>> ot.RandomGenerator.SetSeed(0)
    >>> distribution = ot.Normal()
    >>> sample = distribution.getSample(30)
    >>> tested_distributions = [ot.ExponentialFactory(), ot.NormalFactory()]
    >>> best_model = ot.FittingTest_BestModelBIC(sample, tested_distributions)
    >>> print(best_model)
    Normal(mu = -0.0944924, sigma = 0.989808)
    """
  return _stattests.FittingTest_BestModelBIC(*args)

def FittingTest_BestModelKolmogorov(*args):
  """
    Select the best model according to the Kolmogorov goodness-of-fit test.

    Parameters
    ----------
    sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
        Tested sample.
    models : list of :class:`~openturns.Distribution` or :class:`~openturns.DistributionFactory`
        Tested distributions.

    Returns
    -------
    best_model : :class:`~openturns.Distribution`
        The best distribution for the sample according to Bayesian information
        criterion.
        This may raise a warning if the best model does not perform well.
    best_result : :class:`~openturns.TestResult`
        Best test result.

    See Also
    --------
    FittingTest_Kolmogorov

    Examples
    --------
    >>> import openturns as ot
    >>> ot.RandomGenerator.SetSeed(0)
    >>> distribution = ot.Normal()
    >>> sample = distribution.getSample(30)
    >>> tested_distributions = [ot.ExponentialFactory(), ot.NormalFactory()]
    >>> best_model, best_result = ot.FittingTest_BestModelKolmogorov(sample, tested_distributions)
    >>> print(best_model)
    Normal(mu = -0.0944924, sigma = 0.989808)
    """
  return _stattests.FittingTest_BestModelKolmogorov(*args)

def FittingTest_BestModelChiSquared(*args):
  """
    Select the best model according to the :math:`\\chi^2` goodness-of-fit test.

    Parameters
    ----------
    sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
        Tested sample.
    models : list of :class:`~openturns.Distribution` or :class:`~openturns.DistributionFactory`
        Tested distributions.

    Returns
    -------
    best_model : :class:`~openturns.Distribution`
        The best distribution for the sample according to Bayesian information
        criterion.
        This may raise a warning if the best model does not perform well.
    best_result : :class:`~openturns.TestResult`
        Best test result.

    See Also
    --------
    FittingTest_ChiSquared

    Examples
    --------
    >>> import openturns as ot
    >>> ot.RandomGenerator.SetSeed(0)
    >>> distribution = ot.Poisson()
    >>> sample = distribution.getSample(30)
    >>> tested_distributions = [ot.PoissonFactory(), ot.UserDefinedFactory()]
    >>> best_model = ot.FittingTest_BestModelBIC(sample, tested_distributions)
    >>> print(best_model)
    Poisson(lambda = 1.06667)
    """
  return _stattests.FittingTest_BestModelChiSquared(*args)

def FittingTest_BIC(*args):
  """
    Compute the Bayesian information criterion.

    Parameters
    ----------
    sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
        Tested sample.
    model : :class:`~openturns.Distribution` or :class:`~openturns.DistributionFactory`
        Tested distribution.
    n_parameters : int, :math:`0 \\leq k`, optional
        The number of parameters in the distribution that have been estimated from
        the sample.
        This parameter must not be provided if a :class:`~openturns.DistributionFactory`
        was provided as the second argument (it will internally be set to the
        number of parameters estimated by the :class:`~openturns.DistributionFactory`).
        It can be specified if  a :class:`~openturns.Distribution` was provided
        as the second argument, but if it is not, it will be set equal to 0.

    Returns
    -------
    BIC : float
        The Bayesian information criterion.

    Notes
    -----
    The Bayesian information criterion is defined as follows:

    .. math::

        {\\rm BIC} = \\frac{1}{m}
                    \\left(- 2 \\log L(\\vect{x}^{(i)}, i = 1, \\ldots, m)
                          + k \\log m\\right)

    where :math:`\\log L` denotes the log-likelihood of the sample with respect to
    the given distribution, and :math:`k` denotes the number of estimated
    parameters in the distribution.

    This is used for model selection.

    Examples
    --------
    >>> import openturns as ot
    >>> ot.RandomGenerator.SetSeed(0)
    >>> distribution = ot.Normal()
    >>> sample = distribution.getSample(30)
    >>> ot.FittingTest_BIC(sample, distribution)
    2.7938693005063415
    >>> ot.FittingTest_BIC(sample, distribution, 2)
    3.0206157926171517
    >>> ot.FittingTest_BIC(sample, ot.NormalFactory())
    3.0108025506670955
    """
  return _stattests.FittingTest_BIC(*args)

def FittingTest_Kolmogorov(*args):
  """
    Perform a Kolmogorov goodness-of-fit test for 1-d continuous distributions.

    Parameters
    ----------
    sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
        Tested sample.
    model : :class:`~openturns.Distribution` or :class:`~openturns.DistributionFactory`
        Tested distribution.
    level : float, :math:`0 \\leq {\\rm level} \\leq 1`, optional
        This is the value such that :math:`\\alpha = 1 - {\\rm level}` is the risk of
        committing a Type I error, that is an incorrect rejection of a true
        null hypothesis.
    n_parameters : int, :math:`0 \\leq k`, optional
        The number of parameters in the distribution that have been estimated from
        the sample.
        This parameter must not be provided if a :class:`~openturns.DistributionFactory`
        was provided as the second argument (it will internally be set to the
        number of parameters estimated by the :class:`~openturns.DistributionFactory`).
        It can be specified if  a :class:`~openturns.Distribution` was provided
        as the second argument, but if it is not, it will be set equal to 0.

    Returns
    -------
    test_result : :class:`~openturns.TestResult`
        Test result.

    Raises
    ------
    TypeError : If the distribution is not continuous or if the sample is
        multivariate.

    Notes
    -----
    The present implementation of the Kolmogorov goodness-of-fit test is
    two-sided. This uses an external C implementation of the Kolmogorov cumulative
    distribution function by [Simard2010]_.

    Examples
    --------
    >>> import openturns as ot
    >>> ot.RandomGenerator.SetSeed(0)
    >>> distribution = ot.Normal()
    >>> sample = distribution.getSample(30)
    >>> ot.FittingTest_Kolmogorov(sample, ot.NormalFactory(), .99)
    class=TestResult name=Unnamed type=KolmogorovDistribution binaryQualityMeasure=true p-value threshold=0.01 p-value=0.846896 description=[Normal(mu = -0.0944924, sigma = 0.989808) vs sample Normal]
    """
  return _stattests.FittingTest_Kolmogorov(*args)

def FittingTest_ChiSquared(*args):
  """
    Perform a :math:`\\chi^2` goodness-of-fit test for 1-d discrete distributions.

    Parameters
    ----------
    sample : :class:`~openturns.NumericalSample` or 2d array, list or tuple
        Tested sample.
    model : :class:`~openturns.Distribution` or :class:`~openturns.DistributionFactory`
        Tested distribution.
    level : float, :math:`0 \\leq {\\rm level} \\leq 1`, optional
        This the value such that :math:`\\alpha = 1 - {\\rm level}` is the risk of
        committing a Type I error, that is an incorrect rejection of a true
        null hypothesis.
    n_parameters : int, :math:`0 \\leq k`, optional
        The number of parameters in the distribution that have been estimated from
        the sample.
        This parameter must not be provided if a :class:`~openturns.DistributionFactory`
        was provided as the second argument (it will internally be set to the
        number of parameters estimated by the :class:`~openturns.DistributionFactory`).
        It can be specified if  a :class:`~openturns.Distribution` was provided
        as the second argument, but if it is not, it will be set equal to 0.

    Returns
    -------
    test_result : :class:`~openturns.TestResult`
        Test result.

    Raises
    ------
    TypeError : If the distribution is not discrete or if the sample is
        multivariate.

    Notes
    -----
    This is an interface to the `chisq.test function from the
    'stats' R package <http://stat.ethz.ch/R-manual/R-patched/library/stats/html/chisq.test.html>`_.

    Examples
    --------
    >>> import openturns as ot
    >>> ot.RandomGenerator.SetSeed(0)
    >>> distribution = ot.Poisson()
    >>> sample = distribution.getSample(30)
    >>> ot.FittingTest_ChiSquared(sample, ot.PoissonFactory(), .99)
    class=TestResult name=Unnamed type=ChiSquaredPoisson binaryQualityMeasure=true p-value threshold=0.01 p-value=0.606136 description=[]
    """
  return _stattests.FittingTest_ChiSquared(*args)

class HypothesisTest(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, HypothesisTest, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, HypothesisTest, name)
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_getmethods__["ChiSquared"] = lambda x: _stattests.HypothesisTest_ChiSquared
    if _newclass:ChiSquared = staticmethod(_stattests.HypothesisTest_ChiSquared)
    __swig_getmethods__["Pearson"] = lambda x: _stattests.HypothesisTest_Pearson
    if _newclass:Pearson = staticmethod(_stattests.HypothesisTest_Pearson)
    __swig_getmethods__["Smirnov"] = lambda x: _stattests.HypothesisTest_Smirnov
    if _newclass:Smirnov = staticmethod(_stattests.HypothesisTest_Smirnov)
    __swig_getmethods__["Spearman"] = lambda x: _stattests.HypothesisTest_Spearman
    if _newclass:Spearman = staticmethod(_stattests.HypothesisTest_Spearman)
    __swig_getmethods__["PartialPearson"] = lambda x: _stattests.HypothesisTest_PartialPearson
    if _newclass:PartialPearson = staticmethod(_stattests.HypothesisTest_PartialPearson)
    __swig_getmethods__["PartialRegression"] = lambda x: _stattests.HypothesisTest_PartialRegression
    if _newclass:PartialRegression = staticmethod(_stattests.HypothesisTest_PartialRegression)
    __swig_getmethods__["PartialSpearman"] = lambda x: _stattests.HypothesisTest_PartialSpearman
    if _newclass:PartialSpearman = staticmethod(_stattests.HypothesisTest_PartialSpearman)
    __swig_getmethods__["FullPearson"] = lambda x: _stattests.HypothesisTest_FullPearson
    if _newclass:FullPearson = staticmethod(_stattests.HypothesisTest_FullPearson)
    __swig_getmethods__["FullRegression"] = lambda x: _stattests.HypothesisTest_FullRegression
    if _newclass:FullRegression = staticmethod(_stattests.HypothesisTest_FullRegression)
    __swig_getmethods__["FullSpearman"] = lambda x: _stattests.HypothesisTest_FullSpearman
    if _newclass:FullSpearman = staticmethod(_stattests.HypothesisTest_FullSpearman)
    __swig_destroy__ = _stattests.delete_HypothesisTest
    __del__ = lambda self : None;
HypothesisTest_swigregister = _stattests.HypothesisTest_swigregister
HypothesisTest_swigregister(HypothesisTest)

def HypothesisTest_ChiSquared(*args):
  return _stattests.HypothesisTest_ChiSquared(*args)
HypothesisTest_ChiSquared = _stattests.HypothesisTest_ChiSquared

def HypothesisTest_Pearson(*args):
  return _stattests.HypothesisTest_Pearson(*args)
HypothesisTest_Pearson = _stattests.HypothesisTest_Pearson

def HypothesisTest_Smirnov(*args):
  return _stattests.HypothesisTest_Smirnov(*args)
HypothesisTest_Smirnov = _stattests.HypothesisTest_Smirnov

def HypothesisTest_Spearman(*args):
  return _stattests.HypothesisTest_Spearman(*args)
HypothesisTest_Spearman = _stattests.HypothesisTest_Spearman

def HypothesisTest_PartialPearson(*args):
  return _stattests.HypothesisTest_PartialPearson(*args)
HypothesisTest_PartialPearson = _stattests.HypothesisTest_PartialPearson

def HypothesisTest_PartialRegression(*args):
  return _stattests.HypothesisTest_PartialRegression(*args)
HypothesisTest_PartialRegression = _stattests.HypothesisTest_PartialRegression

def HypothesisTest_PartialSpearman(*args):
  return _stattests.HypothesisTest_PartialSpearman(*args)
HypothesisTest_PartialSpearman = _stattests.HypothesisTest_PartialSpearman

def HypothesisTest_FullPearson(*args):
  return _stattests.HypothesisTest_FullPearson(*args)
HypothesisTest_FullPearson = _stattests.HypothesisTest_FullPearson

def HypothesisTest_FullRegression(*args):
  return _stattests.HypothesisTest_FullRegression(*args)
HypothesisTest_FullRegression = _stattests.HypothesisTest_FullRegression

def HypothesisTest_FullSpearman(*args):
  return _stattests.HypothesisTest_FullSpearman(*args)
HypothesisTest_FullSpearman = _stattests.HypothesisTest_FullSpearman

class LinearModelTest(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, LinearModelTest, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, LinearModelTest, name)
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_getmethods__["LinearModelAdjustedRSquared"] = lambda x: _stattests.LinearModelTest_LinearModelAdjustedRSquared
    if _newclass:LinearModelAdjustedRSquared = staticmethod(_stattests.LinearModelTest_LinearModelAdjustedRSquared)
    __swig_getmethods__["LinearModelFisher"] = lambda x: _stattests.LinearModelTest_LinearModelFisher
    if _newclass:LinearModelFisher = staticmethod(_stattests.LinearModelTest_LinearModelFisher)
    __swig_getmethods__["LinearModelResidualMean"] = lambda x: _stattests.LinearModelTest_LinearModelResidualMean
    if _newclass:LinearModelResidualMean = staticmethod(_stattests.LinearModelTest_LinearModelResidualMean)
    __swig_getmethods__["LinearModelRSquared"] = lambda x: _stattests.LinearModelTest_LinearModelRSquared
    if _newclass:LinearModelRSquared = staticmethod(_stattests.LinearModelTest_LinearModelRSquared)
    __swig_destroy__ = _stattests.delete_LinearModelTest
    __del__ = lambda self : None;
LinearModelTest_swigregister = _stattests.LinearModelTest_swigregister
LinearModelTest_swigregister(LinearModelTest)

def LinearModelTest_LinearModelAdjustedRSquared(*args):
  return _stattests.LinearModelTest_LinearModelAdjustedRSquared(*args)
LinearModelTest_LinearModelAdjustedRSquared = _stattests.LinearModelTest_LinearModelAdjustedRSquared

def LinearModelTest_LinearModelFisher(*args):
  return _stattests.LinearModelTest_LinearModelFisher(*args)
LinearModelTest_LinearModelFisher = _stattests.LinearModelTest_LinearModelFisher

def LinearModelTest_LinearModelResidualMean(*args):
  return _stattests.LinearModelTest_LinearModelResidualMean(*args)
LinearModelTest_LinearModelResidualMean = _stattests.LinearModelTest_LinearModelResidualMean

def LinearModelTest_LinearModelRSquared(*args):
  return _stattests.LinearModelTest_LinearModelRSquared(*args)
LinearModelTest_LinearModelRSquared = _stattests.LinearModelTest_LinearModelRSquared

class NormalityTest(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, NormalityTest, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, NormalityTest, name)
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_getmethods__["AndersonDarlingNormal"] = lambda x: _stattests.NormalityTest_AndersonDarlingNormal
    if _newclass:AndersonDarlingNormal = staticmethod(_stattests.NormalityTest_AndersonDarlingNormal)
    __swig_getmethods__["CramerVonMisesNormal"] = lambda x: _stattests.NormalityTest_CramerVonMisesNormal
    if _newclass:CramerVonMisesNormal = staticmethod(_stattests.NormalityTest_CramerVonMisesNormal)
    __swig_destroy__ = _stattests.delete_NormalityTest
    __del__ = lambda self : None;
NormalityTest_swigregister = _stattests.NormalityTest_swigregister
NormalityTest_swigregister(NormalityTest)

def NormalityTest_AndersonDarlingNormal(*args):
  return _stattests.NormalityTest_AndersonDarlingNormal(*args)
NormalityTest_AndersonDarlingNormal = _stattests.NormalityTest_AndersonDarlingNormal

def NormalityTest_CramerVonMisesNormal(*args):
  return _stattests.NormalityTest_CramerVonMisesNormal(*args)
NormalityTest_CramerVonMisesNormal = _stattests.NormalityTest_CramerVonMisesNormal

class DickeyFullerTest(openturns.common.PersistentObject):
    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, DickeyFullerTest, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, DickeyFullerTest, name)
    __repr__ = _swig_repr
    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _stattests.DickeyFullerTest_getClassName(self)

    def testUnitRootInDriftAndLinearTrendModel(self, level=0.95): return _stattests.DickeyFullerTest_testUnitRootInDriftAndLinearTrendModel(self, level)
    def testUnitRootInDriftModel(self, level=0.95): return _stattests.DickeyFullerTest_testUnitRootInDriftModel(self, level)
    def testUnitRootInAR1Model(self, level=0.95): return _stattests.DickeyFullerTest_testUnitRootInAR1Model(self, level)
    def runStrategy(self, level=0.95): return _stattests.DickeyFullerTest_runStrategy(self, level)
    def testUnitRootAndNoLinearTrendInDriftAndLinearTrendModel(self, level=0.95): return _stattests.DickeyFullerTest_testUnitRootAndNoLinearTrendInDriftAndLinearTrendModel(self, level)
    def testNoUnitRootAndNoLinearTrendInDriftAndLinearTrendModel(self, level=0.95): return _stattests.DickeyFullerTest_testNoUnitRootAndNoLinearTrendInDriftAndLinearTrendModel(self, level)
    def testUnitRootAndNoDriftInDriftModel(self, level=0.95): return _stattests.DickeyFullerTest_testUnitRootAndNoDriftInDriftModel(self, level)
    def testNoUnitRootAndNoDriftInDriftModel(self, level=0.95): return _stattests.DickeyFullerTest_testNoUnitRootAndNoDriftInDriftModel(self, level)
    def setVerbose(self, *args): return _stattests.DickeyFullerTest_setVerbose(self, *args)
    def getVerbose(self): return _stattests.DickeyFullerTest_getVerbose(self)
    def __init__(self, *args): 
        this = _stattests.new_DickeyFullerTest(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _stattests.delete_DickeyFullerTest
    __del__ = lambda self : None;
DickeyFullerTest_swigregister = _stattests.DickeyFullerTest_swigregister
DickeyFullerTest_swigregister(DickeyFullerTest)

# This file is compatible with both classic and new-style classes.