This file is indexed.

/usr/include/openturns/swig/HypothesisTest_doc.i is in libopenturns-dev 1.7-3.

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
%feature("docstring") OT::HypothesisTest::ChiSquared
"Test whether two discrete samples are independent.

**Available usages**:

    HypothesisTest.ChiSquared(*firstSample, secondSample*)

    HypothesisTest.ChiSquared(*firstSample, secondSample, level*)


Parameters
----------
fisrtSample : 2-d sequence of float
    First tested sample, of dimension 1.
secondSample : 2-d sequence of float
    Second tested sample, of dimension 1.
level : positive float :math:`< 1`
    Threshold p-value of the test (= 1 - first type risk), it must be
    :math:`< 1`, equal to 0.95 by default.

Returns
-------
testResult : :class:`~openturns.TestResult`
    Structure containing the result of the test.

See Also
--------
HypothesisTest_Pearson, HypothesisTest_Spearman

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> distCol = [ot.Normal(), ot.Normal()]
>>> distribution = ot.ComposedDistribution(distCol)
>>> sample = distribution.getSample(30)
>>> test_result = ot.HypothesisTest.ChiSquared(sample[:,0], sample[:,1])
>>> print(test_result)
class=TestResult name=Unnamed type=TwoSampleChiSquared binaryQualityMeasure=true p-value threshold=0.05 p-value=0.237197 description=[]
"

// ---------------------------------------------------------------------

%feature("docstring") OT::HypothesisTest::FullPearson
"Test whether two discrete samples are independent.

**Available usages**:

    HypothesisTest.FullPearson(*firstSample, secondSample*)

    HypothesisTest.FullPearson(*firstSample, secondSample, level*)


Parameters
----------
fisrtSample : 2-d sequence of float
    First tested sample, of dimension :math:`n \\\\geq 1`.
secondSample : 2-d sequence of float
    Second tested sample, of dimension 1.
level : positive float :math:`< 1`
    Threshold p-value of the test (= 1 - first type risk), it must be
    :math:`< 1`, equal to 0.95 by default.

Returns
-------
testResult : :class:`~openturns.TestResult`
    Structure containing the result of the test.

See Also
--------
HypothesisTest_Pearson, HypothesisTest_PartialPearson

Notes
-----
The Full Pearson Test is the independence Pearson test between 2 samples :
*firstSample* of dimension *n* and *secondSample* of dimension 1. If
*firstSample[i]* is the numerical sample extracted from *firstSample*
(:math:`i^{th}` coordinate of each point of the numerical sample), FullPearson
performs the independence Pearson test simultaneously on *firstSample[i]* and 
secondSample. For all *i*, it is supposed that the couple (*firstSample[i]* and
*secondSample*) is issued from a gaussian vector.

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> distCol = [ot.Normal(), ot.Normal(), ot.Normal()]
>>> S = ot.CorrelationMatrix(3)
>>> S[0, 2] = 0.9
>>> copula = ot.NormalCopula(S)
>>> distribution = ot.ComposedDistribution(distCol, copula)
>>> sample = distribution.getSample(30)
>>> firstSample = sample[:, :2]
>>> secondSample = sample[:, 2]
>>> test_result = ot.HypothesisTest.FullPearson(firstSample, secondSample)
>>> print(test_result)
[class=TestResult name=Unnamed type=Pearson binaryQualityMeasure=false p-value threshold=0.05 p-value=7.23865e-14 description=[],class=TestResult name=Unnamed type=Pearson binaryQualityMeasure=true p-value threshold=0.05 p-value=0.895124 description=[]]

"

// ---------------------------------------------------------------------

%feature("docstring") OT::HypothesisTest::FullRegression
"Test whether two discrete samples are not linear.

**Available usages**:

    HypothesisTest.FullRegression(*firstSample, secondSample*)

    HypothesisTest.FullRegression(*firstSample, secondSample, level*)


Parameters
----------
fisrtSample : 2-d sequence of float
    First tested sample, of dimension :math:`n \\\\geq 1`.
secondSample : 2-d sequence of float
    Second tested sample, of dimension 1.
level : positive float :math:`< 1`
    Threshold p-value of the test (= 1 - first type risk), it must be
    :math:`< 1`, equal to 0.95 by default.

Returns
-------
testResult : :class:`~openturns.TestResult`
    Structure containing the result of the test.

See Also
--------
HypothesisTest_PartialRegression, LinearModelTest_LinearModelFisher

Notes
-----
The Full Regression Test is used to check the quality of the linear regression
model between two samples: *firstSample* of dimension *n* and *secondSample* of
dimension 1. If *firstSample[i]* is the numerical sample extracted from
*firstSample* (:math:`i^{th}` coordinate of each point of the numerical sample),
FullRegression performs the linear regression test simultaneously on all
*firstSample[i]* and *secondSample*. The linear regression test tests if the
linear regression model between two scalar numerical samples is not significant.
It is based on the deviation analysis of the regression. The Fisher distribution
is used.

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> dim = 3
>>> distCol = [ot.Normal()] * dim
>>> S = ot.CorrelationMatrix(dim)
>>> S[0, dim - 1] = 0.99
>>> copula = ot.NormalCopula(S)
>>> distribution = ot.ComposedDistribution(distCol, copula)
>>> sample = distribution.getSample(30)
>>> firstSample = sample[:, :2]
>>> secondSample = sample[:, 2]
>>> test_result = ot.HypothesisTest.FullRegression(firstSample, secondSample)
>>> print(test_result)
[class=TestResult name=Unnamed type=Regression binaryQualityMeasure=false p-value threshold=0.05 p-value=9.70282e-27 description=[],class=TestResult name=Unnamed type=Regression binaryQualityMeasure=true p-value threshold=0.05 p-value=0.11352 description=[]]"

// ---------------------------------------------------------------------

%feature("docstring") OT::HypothesisTest::FullSpearman
"Test whether two discrete samples are not monotonous.

**Available usages**:

    HypothesisTest.FullSpearman(*firstSample, secondSample*)

    HypothesisTest.FullSpearman(*firstSample, secondSample, level*)


Parameters
----------
fisrtSample : 2-d sequence of float
    First tested sample, of dimension :math:`n \\\\geq 1`.
secondSample : 2-d sequence of float
    Second tested sample, of dimension 1.
level : positive float :math:`< 1`
    Threshold p-value of the test (= 1 - first type risk), it must be
    :math:`< 1`, equal to 0.95 by default.

Returns
-------
testResult : :class:`~openturns.TestResult`
    Structure containing the result of the test.

See Also
--------
HypothesisTest_Spearman, HypothesisTest_PartialSpearman

Notes
-----
The Full Spearman Test is used to check hypothesis of non monotonous relation
between two samples: *firstSample* of dimension *n* and *secondSample* of
dimension 1. If *firstSample[i]* is the numerical sample extracted from
*firstSample* (:math:`i^{th}` coordinate of each point of the numerical sample),
FullSpearman performs the independence Spearman test simultaneously on all
*firstSample[i]* and *secondSample*.

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> distribution = ot.Normal()
>>> sample = distribution.getSample(30)
>>> func = ot.NumericalMathFunction(['x'], ['x', 'x^2'])
>>> testedSample = func(sample)
>>> test_result = ot.HypothesisTest.FullSpearman(testedSample, sample)
>>> print(test_result)
[class=TestResult name=Unnamed type=Spearman binaryQualityMeasure=false p-value threshold=0.05 p-value=0 description=[],class=TestResult name=Unnamed type=Spearman binaryQualityMeasure=true p-value threshold=0.05 p-value=0.44348 description=[]]
"

// ---------------------------------------------------------------------

%feature("docstring") OT::HypothesisTest::PartialPearson
"Test whether two discrete samples are independent.

**Available usages**:

    HypothesisTest.PartialPearson(*firstSample, secondSample, selection*)

    HypothesisTest.PartialPearson(*firstSample, secondSample, selection, level*)


Parameters
----------
fisrtSample : 2-d sequence of float
    First tested sample, of dimension :math:`n \\\\geq 1`.
secondSample : 2-d sequence of float
    Second tested sample, of dimension 1.
selection : sequence of integers, maximum integer value :math:`< n`
    List of indices selecting which subsets of the first sample will successively
    be tested with the second sample through the Pearson test.
level : positive float :math:`< 1`
    Threshold p-value of the test (= 1 - first type risk), it must be
    :math:`< 1`, equal to 0.95 by default.

Returns
-------
testResult : :class:`~openturns.TestResult`
    Structure containing the result of the test.

See Also
--------
HypothesisTest_Pearson, HypothesisTest_FullPearson

Notes
-----
The Partial Pearson Test is used to check the independence between two samples:
*firstSample* of dimension *n* and *secondSample* of dimension 1. The parameter
*selection* enables to select specific subsets of the *firstSample* to be tested.

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> distCol = [ot.Normal(), ot.Normal(), ot.Normal(), ot.Normal()]
>>> S = ot.CorrelationMatrix(4)
>>> S[0, 3] = 0.9
>>> copula = ot.NormalCopula(S)
>>> distribution = ot.ComposedDistribution(distCol, copula)
>>> sample = distribution.getSample(30)
>>> firstSample = sample[:, :3]
>>> secondSample = sample[:, 3]
>>> test_result = ot.HypothesisTest.PartialPearson(firstSample, secondSample, [0, 2])
>>> print(test_result)
[class=TestResult name=Unnamed type=Pearson binaryQualityMeasure=false p-value threshold=0.05 p-value=1.17002e-10 description=[],class=TestResult name=Unnamed type=Pearson binaryQualityMeasure=true p-value threshold=0.05 p-value=0.19193 description=[]]
"

// ---------------------------------------------------------------------

%feature("docstring") OT::HypothesisTest::PartialRegression
"Test whether two discrete samples are independent.

**Available usages**:

    HypothesisTest.PartialRegression(*firstSample, secondSample, selection*)

    HypothesisTest.PartialRegression(*firstSample, secondSample, selection, level*)


Parameters
----------
fisrtSample : 2-d sequence of float
    First tested sample, of dimension :math:`n \\\\geq 1`.
secondSample : 2-d sequence of float
    Second tested sample, of dimension 1.
selection : sequence of int, maximum integer value :math:`< n`
    List of indices selecting which subsets of the first sample will successively
    be tested with the second sample through the regression test.
level : positive float :math:`< 1`
    Threshold p-value of the test (= 1 - first type risk), it must be
    :math:`< 1`, equal to 0.95 by default.

Returns
-------
testResult : :class:`~openturns.TestResult`
    Structure containing the result of the test.

See Also
--------
HypothesisTest_FullRegression, LinearModelTest_LinearModelFisher

Notes
-----
The Partial Regression Test is used to check the quality of the linear regression
model between two samples: *firstSample* of dimension *n* and *secondSample* of
dimension 1. The parameter *selection* enables to select specific subsets of the
*firstSample* to be tested.

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> dim = 3
>>> distCol = [ot.Normal()] * dim
>>> S = ot.CorrelationMatrix(dim)
>>> S[0, dim - 1] = 0.99
>>> copula = ot.NormalCopula(S)
>>> distribution = ot.ComposedDistribution(distCol, copula)
>>> sample = distribution.getSample(30)
>>> firstSample = sample[:, :2]
>>> secondSample = sample[:, 2]
>>> selection = [1]
>>> test_result = ot.HypothesisTest.PartialRegression(firstSample, secondSample, selection)
>>> print(test_result)
[class=TestResult name=Unnamed type=Regression binaryQualityMeasure=true p-value threshold=0.05 p-value=0.579638 description=[]]"

// ---------------------------------------------------------------------

%feature("docstring") OT::HypothesisTest::PartialSpearman
"Test whether two discrete samples are not monotonous.

**Available usages**:

HypothesisTest_PartialSpearman(*firstSample, secondSample, selection*)

HypothesisTest_PartialSpearman(*firstSample, secondSample, selection, level*)


Parameters
----------
fisrtSample : 2-d sequence of float
    First tested sample, of dimension :math:`n \\\\geq 1`.
secondSample : 2-d sequence of float
    Second tested sample, of dimension 1.
selection : sequence of integers, maximum integer value :math:`< n`
    List of indices selecting which subsets of the first sample will successively
    be tested with the second sample through the Spearman test.
level : positive float :math:`< 1`
    Threshold p-value of the test (= 1 - first type risk), it must be
    :math:`< 1`, equal to 0.95 by default.

Returns
-------
testResult : :class:`~openturns.TestResult`
    Structure containing the result of the test.

See Also
--------
HypothesisTest_Spearman, HypothesisTest_FullSpearman

Notes
-----
The Partial Spearman Test is used to check hypothesis of non monotonous relation
between two samples: *firstSample* of dimension *n* and *secondSample* of
dimension 1. The parameter *selection* enables to select specific subsets of the
*firstSample* to be tested.

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> distribution = ot.Normal()
>>> sample = distribution.getSample(30)
>>> func = ot.NumericalMathFunction(['x'], ['x', 'x^2', 'x^3', 'sin(5*x)'])
>>> testedSample = func(sample)
>>> test_result = ot.HypothesisTest.PartialSpearman(testedSample, sample, [0,3])
>>> print(test_result)
[class=TestResult name=Unnamed type=Spearman binaryQualityMeasure=false p-value threshold=0.05 p-value=0 description=[],class=TestResult name=Unnamed type=Spearman binaryQualityMeasure=true p-value threshold=0.05 p-value=0.57214 description=[]]
"

// ---------------------------------------------------------------------

%feature("docstring") OT::HypothesisTest::Pearson
"Test whether two discrete samples are independent.

**Available usages**:

    HypothesisTest.Pearson(*firstSample, secondSample*)

    HypothesisTest.Pearson(*firstSample, secondSample, level*)


Parameters
----------
fisrtSample : 2-d sequence of float
    First tested sample, of dimension :math:`n \\\\geq 1`.
secondSample : 2-d sequence of float
    Second tested sample, of dimension 1.
level : positive float :math:`< 1`
    Threshold p-value of the test (= 1 - first type risk), it must be
    :math:`< 1`, equal to 0.95 by default.

Returns
-------
testResult : :class:`~openturns.TestResult`
    Structure containing the result of the test.

See Also
--------
HypothesisTest_Smirnov, HypothesisTest_Spearman

Notes
-----
The Pearson Test is used to check whether two samples which are assumed to form
a gaussian vector are independent (based on the evaluation of the linear
correlation coefficient).

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> distCol = [ot.Normal(), ot.Normal()]
>>> firstSample = ot.Normal().getSample(30)
>>> secondSample = ot.Normal().getSample(30)
>>> test_result = ot.HypothesisTest.Pearson(firstSample, secondSample)
>>> print(test_result)
class=TestResult name=Unnamed type=TwoSamplePearson binaryQualityMeasure=true p-value threshold=0.05 p-value=0.984737 description=[]
"

// ---------------------------------------------------------------------

%feature("docstring") OT::HypothesisTest::Smirnov
"Test whether two samples follows the same distribution.

**Available usages**:

    HypothesisTest.Smirnov(*firstSample, secondSample*)

    HypothesisTest.Smirnov(*firstSample, secondSample, level*)


Parameters
----------
fisrtSample : 2-d sequence of float
    First tested sample, of dimension :math:`n \\\\geq 1`.
secondSample : 2-d sequence of float
    Second tested sample, of dimension 1.
level : positive float :math:`< 1`
    Threshold p-value of the test (= 1 - first type risk), it must be
    :math:`< 1`, equal to 0.95 by default.

Returns
-------
testResult : :class:`~openturns.TestResult`
    Structure containing the result of the test.

See Also
--------
HypothesisTest_Pearson, HypothesisTest_Spearman

Notes
-----
Smirnov's test is a tool that may be used to compare two samples
:math:`\\\\{x_1, \\\\ldots, x_N\\\\}` and :math:`\\\\{x^{'}_1, \\\\ldots, x^{'}_M\\\\}` (of sizes not
necessarily equal). The goal is to determine whether these two samples come from
the same probability distribution or not. If this is the case, the two samples
should be aggregated in order to increase the robustness of further statistical
analyses.

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> distCol = [ot.Normal(), ot.Normal()]
>>> firstSample = ot.Normal().getSample(30)
>>> secondSample = ot.Normal().getSample(30)
>>> test_result = ot.HypothesisTest.Smirnov(firstSample, secondSample)
>>> print(test_result)
class=TestResult name=Unnamed type=TwoSampleSmirnov binaryQualityMeasure=true p-value threshold=0.05 p-value=0.807963 description=[]
"

// ---------------------------------------------------------------------

%feature("docstring") OT::HypothesisTest::Spearman
"Test whether two discrete samples are not monotonous.

**Available usages**:

    HypothesisTest.Spearman(*firstSample, secondSample*)

    HypothesisTest.Spearman(*firstSample, secondSample, level*)


Parameters
----------
fisrtSample : 2-d sequence of float
    First tested sample, of dimension :math:`n \\\\geq 1`.
secondSample : 2-d sequence of float
    Second tested sample, of dimension 1.
level : positive float :math:`< 1`
    Threshold p-value of the test (= 1 - first type risk), it must be
    :math:`< 1`, equal to 0.95 by default.

Returns
-------
testResult : :class:`~openturns.TestResult`
    Structure containing the result of the test.

See Also
--------
HypothesisTest_Smirnov, HypothesisTest_Pearson

Notes
-----
The Spearman Test is used to check whether two scalar samples have a monotonous
relation.

Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> distribution = ot.Normal()
>>> firstSample = distribution.getSample(30)
>>> func = ot.NumericalMathFunction('x', 'x^2')
>>> secondSample = func(firstSample)
>>> test_result = ot.HypothesisTest.Spearman(firstSample, secondSample)
>>> print(test_result)
class=TestResult name=Unnamed type=TwoSampleSpearman binaryQualityMeasure=true p-value threshold=0.05 p-value=0.44348 description=[]
"