Statistics I COMPLEMENTARY MATERIAL How to Calculate Probability Using Excel 1. Introduction Excel formulas or statistical functions can be used to calculate probabilities. Any statistical function in Microsoft Excel 2007 and 2010, or another version, can be accessed in different ways, as indicated in Lab 1. We can click the insert function f (x) icon and choose the statistical functions. Another way is to use Formulas in the Excel options (left side of the toolbar) and select statistical formulas: And, finally, there is another way to insert a function using Shift + F3 that shows the following dialog box in which the Statistics category is selected 1 2. Calculation of probabilities in discrete random variables: Binomial There are several formulas or functions related to the calculation of probabilities associated with the binomial distribution. In particular: BINOM.CRIT DISTR.BINOM 2.1 BINOM.CRIT This function allows to calculate the lowest value whose accumulated binomial probability is equal to a probability taken as critical value, given a number of tests (sample size) and a probability of success in each test. Ensayos: the sample size or the number of results that could be a success or a failure Prob_éxito: probability of favorable results Alfa: critical value The result is the value that has a cumulative probability equal to or greater than the Alpha value. Example: This function is used in QC (Quality Control) applications. For example, to determine the largest number of defective parts that a washing machine assembly line can produce without having to reject the whole lot. Data: 20 trials with a probability of success of 0.6 and a critical value of 85%. BINOM.CRIT(20;0,6;0,85) = 14 2 2.2 DISTRIB.BINOM This function results in the probability of a discrete random variable following a binomial probability distribution. Núm_éxito: Number of favorable or successful results of the experiment Ensayos: sample size or the number of results that can result as a success or a failure Prob_éxito: probability that the result of the experiment is favorable Acumulado: represents the form of the distribution, TRUE for cumulative or FALSE distribution function for probability mass function. Example: The probability that a student will bring his laptop to class is 0.25. If there are 20 students in a class, calculate the following probabilities: a) What is the probability that exactly 7 students bring the laptop to class? P(n=20; p=0,25; x=7) DISTR.BINOM(7; 20; 0,25; 0) = 0,1124 3 b) What is the probability that at most 7 students will bring the laptop? P (n=20; p=0,25; x<=7) DISTR.BINOM(7; 20; 0,25; 1) = 0,8982 c) What is the probability of less than 6 students bringing it? P (n=20; p=0,25; x<6) = P (n=20; p=0,25; x<=5) DISTR.BINOM(5; 20; 0,25; 1) = 0,6172 d) What is the probability that more than 7 students will come with a laptop? P (n=20; p=0,25; x>7) = P (n=20; p=0,25; x<=6) 1 - DISTR.BINOM(6; 20; 0,25; 1) = 1 - 0,785781948 = 0,214218052 e) What is the probability that at least 6 students will come with their laptop to class? P(n=20; p=0,25; x>=6) = P(n=20; p=0,25; x<5) = 1 - P(n=20; p=0,25; x>=5) 1 - DISTR.BINOM(5; 20; 0,25; 1) = 1 - 0,617172654 = 0,382827346 4 3. Calculation of probabilities in continuous random variables: Normal There are several formulas and functions related to the calculation of probabilities associated with the Normal distribution. In this case there are the following: DISTR.NORM DISTR.NORM.INV NORMALIZACIÓN DISTR.NORM.ESTAND DISTR.NORM.ESTAND.INV 3.1. DISTRIB.NORM This function calculates the probability associated with a random variable that is distributed Normal, given the mean and standard deviation of the population. X: value to be used to calculate the probability Media: mean of the distribution Desv_estándar: standard deviation Acum: logical value that defines the shape of the distribution (TRUE for cumulative probability and FALSE for the probability distribution function). Example: The annual profit of a company can be approximated by a normal distribution with mean 170 thousand of euros and standard deviation 800 euros. Therefore, the annual benefit (measured in thousands of euros) follows a N(170, 0.8). Calculate the following probabilities: a) What is the probability that the benefit will be between 168 and 171 thousand euros? DISTR.NORM(171; 170; 0,8; 1) - DISTR.NORM(168; 170; 0,8; 1) = 0.894350226 – 0.006209665 = 0,888140561 5 b) What is the probability that the benefit will be less than 169,500 euros? DISTR.NORM(169,5; 170; 0,8; 1) = 0,265985529 c) What is the probability that the benefit will exceed 172 thousand euros? 1 - DISTR.NORM(172; 170; 0,8; 1) = 1 - 0,993790335 = 0,006209665 3.2. DISTRIB.NORM.INV DISTR.NORM.INV: This function returns the value of the Normal random variable distribution from a specific probability, mean, and standard deviation. Probabilidad: value of the probability for which you want to calculate the value of the associated variable. Media: average distribution parameter. Desv_estándar: standard deviation distribution parameter. Example Following the previous example of the annual benefit (measured in thousands of euros) N (170, 0.8) distributed, calculate: d) What is the benefit surpassed, at most, in 10% of the years? And for 5% of the years? DISTR.NORM.INV(0,9; 170; 0,8) = 171,0252413 DISTR.NORM.INV(0,95; 170; 0,8) = 171,3158829 6 3.3. STANDARDIZATION This function calculates the standardized values (z-value or z scores): NORMALIZACION(x; media; desv_estándar) X: value you want to normalize. Media: mean of the distribution Desv_estándar: standard deviation of the distribution Example Following the previous example of the annual benefit (measured in thousands of euros) N(170, 0.8) distributed, calculate: e) What is the standardized value of a benefit of 169.5 thousand euros? NORMALIZACION(169,5; 170; 0,8) = -0,625 7 3.4. DISTRIB.NORM.ESTAND This function calculates the value of the probability corresponding to a z score. Example: The number of international trips made to the semester by the manager of a multinational company can be approximated by a normal distribution of average 7 and standard deviation 2 trips. Therefore, the number of international trips follows a N(7, 2). Using the Normal (0, 1) distribution, calculate: a) What is the probability that the manager makes between 5 and 8 trips? DISTR.NORM.ESTAND(0,5) 0,158655254 = 0,532807207 DISTR.NORM.ESTAND(-1) = 0,691462461 – As an alternative to this calculation could be used: DISTR.NORM(8; 7; 2; 1) - DISTR.NORM(5; 7; 2; 1) = 0,691462461 – 0,158655254 = 0,532807207 8 3.5 DISTRIB.NORM.ESTAND.INV This function calculates the z score corresponding to a given probability Example: Following the example of the number of international trips made this semester by the manager of a multinational company that follows a N(7, 2), calculate: b) What is the number of trips that you would have to do at least to not exceed more than 2% of the semesters? DISTR.NORM.ESTAND.INV(0,98) = 2,053748911 c) What is the minimum number of trips that would have been necessary to perform to not exceed more than 2.5% of the semesters? And at 5% and 10%? DISTR.NORM.ESTAND.INV(0,975) = 1,959963985 DISTR.NORM.ESTAND.INV(0,95) = 1,644853627 DISTR.NORM.ESTAND.INV(0,9) = 1,281551566 This formula is very useful for finding the critical values to use in the construction of confidence intervals. 9
© Copyright 2026 Paperzz