{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "When "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "kind",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "'conditional'"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", the limits of the confidence interval are the conditional \"exact confidence limits\" as described by Fisher "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". The conditional odds ratio and confidence interval are also discussed in Section 4.1.2 of the text by Sahai and Khurshid "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "2"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "When "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "kind",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "'sample'"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", the confidence interval is computed under the assumption that the logarithm of the odds ratio is normally distributed with standard error given by      "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "se = sqrt(1/a + 1/b + 1/c + 1/d)",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "where "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "a"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "b"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "c"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "d"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " are the elements of the contingency table.  (See, for example, "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "2"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", section 3.1.3.2, or "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "3"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", section 2.3.3)."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "ci",
              "annotation": "``ConfidenceInterval`` instance",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The confidence interval, represented as an object with attributes "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "low"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "high"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Confidence interval for the odds ratio."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "confidence_level: float",
              "annotation": "",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Desired confidence level for the confidence interval. The value must be given as a fraction between 0 and 1. Default is 0.95 (meaning 95%)."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "alternative",
              "annotation": "{'two-sided', 'less', 'greater'}, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The alternative hypothesis of the hypothesis test to which the confidence interval corresponds. That is, suppose the null hypothesis is that the true odds ratio equals "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "OR"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and the confidence interval is "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(low, high)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". Then the following options for "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "alternative"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " are available (default is 'two-sided'):"
                    }
                  ]
                },
                {
                  "__type": "BulletList",
                  "__tag": 4053,
                  "ordered": false,
                  "start": 1,
                  "children": [
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "'two-sided': the true odds ratio is not equal to "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "OR"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": ". There   is evidence against the null hypothesis at the chosen   "
                            },
                            {
                              "__type": "ParamRef",
                              "__tag": 4071,
                              "name": "confidence_level"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " if "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "high < OR"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " or "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "low > OR"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "."
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "'less': the true odds ratio is less than "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "OR"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": ". The "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "low"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " end   of the confidence interval is 0, and there is evidence against   the null hypothesis at  the chosen "
                            },
                            {
                              "__type": "ParamRef",
                              "__tag": 4071,
                              "name": "confidence_level"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " if   "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "high < OR"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "."
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "'greater': the true odds ratio is greater than "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "OR"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": ".  The   "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "high"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " end of the confidence interval is "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "np.inf"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": ", and there   is evidence against the null hypothesis at the chosen   "
                            },
                            {
                              "__type": "ParamRef",
                              "__tag": 4071,
                              "name": "confidence_level"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " if "
                            },
                            {
                              "__type": "InlineCode",
                              "__tag": 4051,
                              "value": "low > OR"
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "."
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Attributes",
    "Methods",
    "Returns",
    "Yields",
    "Receives",
    "Other Parameters",
    "Raises",
    "Warns",
    "Warnings",
    "Notes"
  ],
  "item_file": "/scipy/stats/_odds_ratio.py",
  "item_line": 209,
  "item_type": "function",
  "aliases": [
    "scipy.stats._odds_ratio.OddsRatioResult.confidence_interval"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "self",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "confidence_level",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "0.95"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "alternative",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "two-sided"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "confidence_interval"
  },
  "references": [
    ".. [1] R. A. Fisher (1935), The logic of inductive inference,",
    "       Journal of the Royal Statistical Society, Vol. 98, No. 1,",
    "       pp. 39-82.",
    ".. [2] H. Sahai and A. Khurshid (1996), Statistics in Epidemiology:",
    "       Methods, Techniques, and Applications, CRC Press LLC, Boca",
    "       Raton, Florida.",
    ".. [3] Alan Agresti, An Introduction to Categorical Data Analysis",
    "       (second edition), Wiley, Hoboken, NJ, USA (2007)."
  ],
  "qa": "scipy.stats._odds_ratio:OddsRatioResult.confidence_interval",
  "arbitrary": [],
  "local_refs": [
    "alternative",
    "ci",
    "confidence_level: float"
  ]
}