{"componentChunkName":"component---src-components-blogpost-blogpost-jsx","path":"/blog/est1/","result":{"data":{"site":{"siteMetadata":{"title":"K011"}},"mdx":{"id":"af9b5a1d-93a0-545d-a90b-2f5ea3bbf1cc","body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Distribution\",\n  \"date\": \"2021-11-01\",\n  \"description\": \"Data distributions\"\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h1\", null, \"Normal Distribution\"), mdx(\"p\", null, \"-\", mdx(\"strong\", {\n    parentName: \"p\"\n  }, mdx(\"a\", {\n    href: \"https://www.desy.de/~sschmitt/blobel/blobel_errors.pdf\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"Error\")), \" The difference between a data point and a predicted or average value\"), mdx(\"p\", null, \"-\", mdx(\"strong\", {\n    parentName: \"p\"\n  }, mdx(\"a\", {\n    href: \"https://statisticsbyjim.com/glossary/standardization/\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"Standardize\")), \" Subtract the mean and divide by the standard deviation   \\t\"), mdx(\"p\", null, \"-\", mdx(\"strong\", {\n    parentName: \"p\"\n  }, mdx(\"a\", {\n    href: \"https://www.statisticshowto.com/probability-and-statistics/z-score/\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"z-score\")), \" the result of standardizing an individual data point\"), mdx(\"p\", null, \"-\", mdx(\"strong\", {\n    parentName: \"p\"\n  }, mdx(\"a\", {\n    href: \"https://sphweb.bumc.bu.edu/otlt/mph-modules/bs/bs704_probability/bs704_probability9.html\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"standard normal\")), \" A normal distribution with mean = 0 and standard deviation = 1\"), mdx(\"p\", null, \"-\", mdx(\"strong\", {\n    parentName: \"p\"\n  }, mdx(\"a\", {\n    href: \"https://neo4j.com/\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"QQ plot\")), \" A plot to visualize how close a sample distribution is to a specified distribution, e.g., the normal distribution.\"), mdx(\"p\", null, \"A standard normal distribution is one in which the units on the x-axis are expressed in terms of standard devitions away from the mean. To compare data to a standard normal distribution, you subtract the mean and then divide by the standar deviation(\", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"normalization\"), \" or \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"standardization\"), \")\"), mdx(\"p\", null, \"A QQ-Plot is used to visually determine how close a sample is to a specified distribution-In this case, the normal distribution\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-cpp\"\n  }, \"fig,ax =plt.subplots(figsize=(4,4))\\nnorm_sample=stats.norm.rvs(size=100)\\nstats.probplot(norm_sample,plot=ax)\\n\")), mdx(\"p\", null, \"with the method scipy.stats.probplot\"), mdx(\"center\", null, mdx(\"img\", {\n    className: \"w-40-l w-80\",\n    src: \"https://imgur.com/Th0QRF0.png\"\n  }), mdx(\"p\", null, \"Quantile of normal distribution\")), mdx(\"h1\", null, \"Long-Tailed Distributions\"), mdx(\"p\", null, \"The long tail is the colloquial name for a well-known feature of statistical distributions (Zipf, power-law, Pareto distributions and in general L\\xE9vy distributions). The feature is also known as heavy tails, power-law tails, or Pareto tails. These distributions are similar to the graph that accompanies these lines.\\nIn these distributions a large frequenct or high frecuency of \\\"transactions\\\" is followed by a low frequency or low amplitude of the gradually decreasing population. In many cases, the low frequency or low amplitude events-the long tail, represented here by the yellow portion of the graph-may comprise most of the graph\"), mdx(\"p\", null, \"While the normal distribution is often appropiate and useful with respect to the distribution of errors and sample statistics, it typically does not characterize the distribution of raw data; or the distribution can be discrete, as with binomial data.\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-cpp\"\n  }, \"nflx = sp500px.NFLX\\nnflx = np.diff(np.log(nflx[nflx>0]))\\nfig,ax = plt.subplots(figsize=(4,4))\\nstats.probplot(nflx,plot=ax)\\n\")), mdx(\"p\", null, \".\"), mdx(\"center\", null, mdx(\"a\", {\n    href: \"https://en.wikipedia.org/wiki/The_Black_Swan:_The_Impact_of_the_Highly_Improbable\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"The black swan\"), \" ||| \", mdx(\"a\", {\n    href: \"https://www.routledge.com/Handbook-of-Statistical-Distributions-with-Applications/Krishnamoorthy/p/book/9780367658700\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"SDWA\")), mdx(\"h1\", null, \"Student's t-Distribution\"), mdx(\"p\", null, \"In probability and statistics, Student's  t-distribution is a probability distribution that arises from the problem of estimating the mean of a normally distributed population when the sample size is small and the population standard deviation is unknown.\"), mdx(\"p\", null, \"It appears naturally when performing Student's t-test for the determination of the differences between the parts of two populations when the standard deviation of a population is unknown and must be estimated from sample data.\"), mdx(\"p\", null, \"differences in averages\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, mdx(\"a\", {\n    href: \"https://en.wikipedia.org/wiki/Long_tail\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"Degrees of freedom\")), \" A parameter that allows the t-distribution to adjust to different sample sizes, statistics, and number of groups \")), mdx(\"center\", null, mdx(\"img\", {\n    className: \"w-40-l w-80\",\n    src: \"https://imgur.com/o1GRreU.png\"\n  })), mdx(\"p\", null, \".\"), mdx(\"center\", null, mdx(\"a\", {\n    href: \"https://onlinestatbook.com/2/estimation/t_distribution.html\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"the standard treatment\"), \" ||| \", mdx(\"a\", {\n    href: \"http://seismo.berkeley.edu/~kirchner/eps_120/Odds_n_ends/Students_original_paper.pdf\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"Original paper\")), mdx(\"h1\", null, \"Binomial Distribution\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Trial\"), \" An event with a discrete outcome.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Succes (i)\"), \" The outcome of interest for a trial.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Binomial\"), \" Having two outcomes.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Binomial trial (Bernoulli trial)\"), \" A trial with two outcomes\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Binomial Distribution (Bernoulli Distribution)\"), \" Distribution of number of successes in x trials \")), mdx(\"p\", null, \"Fundamental to understanding the binomial distribution is the idea of a set of trials, each of which has two possible outcomes with defined probabilities.For example, flippping a coin 10 times is a binomial experiment with 10 trials, each trial having two possible outcomes(heads or tails);Such yes/no or 0/1 outcomes are termed binary outcomes, and they need not have 50/50 probabilities.\\nThe binomial distribution is the frequency distribution of the number of successes (x) in a given number of trials(n) with specified probability (p) of success in each trial. There is a family of binomial distribution, depending on the values of n and p. The binomial distribution would answer question like:\"), mdx(\"p\", null, \"Binomial outcomes are important to model,since they represent, among other things, fundamental decisions(buy or don't buy, click or don't click, survive or die, etc.).\\nwith a large n, and provided p is not too close to 0 or 1, the binomial distribution can be approximated by the normal distribution.\"), mdx(\"p\", null, \"The \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"scipy.stats\"), \" module implements a large variety of statistical distributions. For the binomial distribution, use the functions stats.binom.pmf and stats.binom.cdf\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-cpp\"\n  }, \"stats.binom.pmf(2, n=5, p=0.1)\\n\\nstats.binom.cdf(2, n=5, p=0.1)\\n\")), mdx(\"h1\", null, \"Chi-Square Distribution\"), mdx(\"p\", null, \"The chi-square distribution is a special case of the gamma distribution and is one of the most widely used probability distributions in Statistical Inference, mainly in hypothesis testing and in the construction of confidence intervals.\\nThe chi-square distribution is the distribution of this statistic under repeated resampled draws from the null model\", mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", mdx(\"strong\", {\n    parentName: \"p\"\n  }, mdx(\"a\", {\n    href: \"https://www.jmp.com/en_us/statistics-knowledge-portal/chi-square-test.html\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"Error\")), \" The difference between a data point and a predicted or average value\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"The chi-suqare distribution is typically concerned with counts of subjects or items falling into categories.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"The chi-square statistic measures the extent of departure from what you would expect in a null model\")), mdx(\"center\", null, mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \" \", mdx(\"a\", {\n    href: \"https://en.wikipedia.org/wiki/The_Lady_Tasting_Tea\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"The Lady Tasting Tea\"), \" \"))), mdx(\"h1\", null, \"F-Distribution\"), mdx(\"p\", null, \"The F-distribution is used with experiments and linear models involving measured data. And the F-Statistic compares variation due to factors of interest to overall variation.\"), mdx(\"center\", null, mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \" \", mdx(\"a\", {\n    href: \"https://books.google.com.co/books/about/Introduction_to_Design_and_Analysis_of_E.html?id=WklbPwAACAAJ&redir_esc=y\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"Introduction to Design and Analysis of Experiments\"), \" \"))), mdx(\"h1\", null, \"Poisson and related Distributions\"), mdx(\"p\", null, \"Many processes produce events randomly at a given overall rate\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"lambda\"), \" The rate(per unit of time or space) at which avents occur\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \" Poisson distribution\"), \" The frequency distribution of the number of events in sampled units of time or space\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \" Exponential distribution \"), \" The frequency distribution of the time or distance from one event to the next event\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \" Weibull distribution \"), \" A generalized version of the exponential distribution in which the event rate is allowed to shift over time\")), mdx(\"p\", null, \".For events that occur at a constant rate, the number of events per unit of time or space can be codeled as a poisson distribution.\\n.You can also model the time or distance between one event and the next as an exponential distribution\\n.A changing event rate over time can be modeled with the weibull distribution.\"), mdx(\"h2\", null, \"Poisson Distributions\"), mdx(\"p\", null, \"The Poisson distribution tells us the distribution of events per unit of time or space when we sample many such units\\nThe key parameter in a Poisson distribution is \", mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"inlineMath\"\n  }, \"\\\\lambda\"), \". This is the mean number of events thtat occurs in a specified interval of time or space.(The variance for a poisson distribution is also \\\\lambda)\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-cpp\"\n  }, \"stats.poisson.rvs(2,size=100)\\n\")), mdx(\"h2\", null, \"Exponential distribution\"), mdx(\"p\", null, \"Using the same parameter \", mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"inlineMath\"\n  }, \"\\\\lambda\"), \" that we used in the Poisson distribution, we can also model the distribution of the time between events.\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-cpp\"\n  }, \"stats.expon.rvs(0.2,size=100)\\n\")), mdx(\"p\", null, \"A key assumption in any simulation study for either the poisson or exponential distribution is that the rate, \", mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"inlineMath\"\n  }, \"\\\\lambda\"), \", remains constants over the period being considered. This is rarely reasonable in a global sense; for example, traffic on roads or data networks varies by time of day and day of week.\"), mdx(\"h2\", null, \"Estimating the Failure Rate\"), mdx(\"p\", null, \"The event rate \", mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"inlineMath\"\n  }, \"\\\\lambda\"), \" is known or can be estimated from a prior data.If there is some data but not enough to provide a precise, reliable estimate of the rate, a goodness-of-fit test can be applied to various rate to determine how well they fit the observed data.\"), mdx(\"h2\", null, \"Weibull Distribution\"), mdx(\"p\", null, \"The wibull distribution is an extension of the exponential distribution in which the event rate is allowed to change, as specified by a shape parameter \", mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"inlineMath\"\n  }, \"\\\\Beta\"), \".If beta>1,the probability of an event increases over time; if \", mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"inlineMath\"\n  }, \"\\\\beta\"), \"<1, the probability decreases. Because the Weibull distribution is used with time-to-failure analysis instead of event rate,the sesecond parameter is expresed in terms of characteristic life, rather than in terms of the rate of events per intervales.the symbol used is \", mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"inlineMath\"\n  }, \"\\\\eta\"), \" scale parameter.\"), mdx(\"center\", null, mdx(\"a\", {\n    href: \"https://www.amazon.com/-/es/Thomas-P-Ryan/dp/0470081872\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"Modern Engineering Statistics \"), \" ||| \", mdx(\"a\", {\n    href: \"http://seismo.berkeley.edu/~kirchner/eps_120/Odds_n_ends/Students_original_paper.pdf\",\n    className: \"link  white hover-white-60\",\n    target: \"_blank\"\n  }, \"Original paper\")));\n}\n;\nMDXContent.isMDXComponent = true;","frontmatter":{"title":"Distribution","date":"2021-11-01","description":"Data distributions"}},"allMdx":{"edges":[{"node":{"frontmatter":{"title":"Classification","date":"2021-11-03","description":"Naive Bayes, Discriminant Analysis, Logistic Regression"},"fields":{"slug":"/blog/est4/"}}},{"node":{"frontmatter":{"title":"Regression and Prediction","date":"2021-11-02","description":"REGRESSION"},"fields":{"slug":"/blog/est3/"}}},{"node":{"frontmatter":{"title":"Distribution","date":"2021-11-01","description":"Data distributions"},"fields":{"slug":"/blog/est1/"}}},{"node":{"frontmatter":{"title":"Stats Testing","date":"2021-11-01","description":"Statistical Experiments and significance testing"},"fields":{"slug":"/blog/est2/"}}},{"node":{"frontmatter":{"title":"Recursion","date":"2021-08-26","description":"Algorithm recursion"},"fields":{"slug":"/blog/alg1/"}}}]}},"pageContext":{"slug":"/blog/est1/","id":"af9b5a1d-93a0-545d-a90b-2f5ea3bbf1cc"}},"staticQueryHashes":["63159454"]}