text
stringlengths
81
47k
source
stringlengths
59
147
Question: <p>Can you guys answer this question regarding part (c)? I am confused of what he means.</p> <p>A deck of <span class="math-container">$52$</span> cards is mixed well, and <span class="math-container">$5$</span> cards are dealt. (a) It can be shown that (disregarding the order in which the cards are dealt) there are <span class="math-container">$2,598,960$</span> possible hands, of which only <span class="math-container">$1287$</span> are hands consisting entirely of clubs. (b) It can be shown that exactly <span class="math-container">$63,206$</span> hands contain only diamonds and spades, with both suits represented. What is the probability that a hand consists entirely of diamonds and spades with both suits represented? (Give the answer to five decimal places.) (c) Using the result of Part (b), what is the probability that a hand contains cards from exactly two suits? (Give the answer to five decimal places.)</p> Answer: <p>By symmetry, there are also $63206$ hands with diamonds and hearts, with both suits represented. </p> <p>There are also $63206$ hands with diamonds and clubs, with both suits represented.</p> <p>The same applies to spades and hearts, to spades and clubs, and so on. Make a list. There are exactly $6$ types of hands that have exactly two suits, including the diamonds and spades case. </p> <p>So there are $(6)(63206)$ hands that have exactly two suits. Thus for c) the answer of b) gets multiplied by $6$.</p>
https://math.stackexchange.com/questions/1447262/probability-of-hand-having-cards-from-exactly-two-hands
Question: <p>Given a sample (the scope is 72 elements) with mode=54 mean=55,7 median=54,5. The 73th value of the extended sample is 56. What can I say about the mode, median and mean of the extended sample?</p> <p>Well, the updated mean is easy to calculate. </p> <p>To make a statement about the median I know the 36th and the 37th value, since the mean of those two values gives me the median, because I have an even number of observations. I would get the equation (x+y)/2=54,5 which doesnt help me in working out the 37th value from what I see. </p> <p>There have to be at least two values of 54, so that it could be the mode of the sample (assuming all other values appear just one time in the sample).</p> Answer: <p>The mean of $n = 72$ observations is $$\bar X_{72} = \frac{\sum_{i=1}^{72} X_i}{72} = 55.7.$$ You can use this information to find $\sum_{i=1}^{72} X_i$ and from there to find $\sum_{i=1}^{73} X_i$ and from there $\bar X_{73}.$</p> <p>To find the median of all 73 observations you need to know observation number $74/2 = 37$ of the sorted data. I think you may be expected to assume all of the $X_i$s are integers. What does the given information tell you about the middle two observations when the original 36 are sorted?</p> <p>Finally, what is the minimum number of the original observations that must have had value 54?</p> <p>In general, problems that ask you to 'update' the mean (and standard deviation) of a sample upon including one more observation are always solvable. But for the median and the mode you cannot always update; you have to rely on quirks of the particular sample in question to see if updating is possible. Do you have enough useful quirks here?</p>
https://math.stackexchange.com/questions/1484493/extended-sample-mode-median-mean
Question: <p>Given a distribution with density <span class="math-container">$$f(x)=\frac{x}{\theta^2}\exp(\frac{-x}{\theta})$$</span> How do I find the Maximum Likelihood Estimator of <span class="math-container">$\log(θ +7)$</span> ?</p> <p>I have found the MLE of <span class="math-container">$\theta$</span> as <span class="math-container">$$\hat\theta=\frac{\bar{X}}{2}$$</span> with the four steps of </p> <ol> <li>Likelihood Function </li> <li>Log Likelihood function </li> <li>Score equation (Equating the log Likelihood function to zero) </li> <li>Solving the Score equation</li> </ol> <p>but I have no idea how to proceed. This is the first time I'm posting a question here, so any feedback is appreciated. </p> Answer: <p>Once you have the MLE <span class="math-container">$\hat{\theta}$</span> of <span class="math-container">$\theta$</span>, the MLE of <span class="math-container">$f(\theta)$</span> is <span class="math-container">$f(\hat{\theta})$</span>, since in both cases we're finding the point in parameter space that maximises the empirical data's likelihood.</p>
https://math.stackexchange.com/questions/2979184/finding-mle-of-a-distribution-density-and-derive-a-new-mle-based-off-of-the-par
Question: <p>I've found different formulas for the Gamma distribution, one where Gamma(alpha, lambda) has an expected value of alpha/lambda due to the Gamma distribution turning into the following image: <a href="https://prnt.sc/lcq5zq" rel="nofollow noreferrer">https://prnt.sc/lcq5zq</a>. However, in other sites I see Beta being used instead of lambda, where Beta is in the denominator instead (<a href="http://prntscr.com/lcq7au" rel="nofollow noreferrer">http://prntscr.com/lcq7au</a>), despite being in the same place as lambda in the function. I'd have thought they were merely representative of the numbers used for the Gamma distribution, but these are completely different in representation-- especially since the expected value is now Alpha*beta, instead of alpha/lambda. Can someone explain this for me?</p> Answer: <p>Both forms are correct as they are just two different parametrizations for the <a href="https://en.m.wikipedia.org/wiki/Gamma_distribution" rel="nofollow noreferrer">Gamma Distribution.</a> The parameter <span class="math-container">$\lambda$</span> wouldn't mean the same thing as the parameter <span class="math-container">$\beta$</span>. In fact, make the substitution <span class="math-container">$\lambda = \frac{1}{\beta}$</span> in your first formula and you will get the second formula. The means also equal using this substitution. </p> <p>To illustrate a simple example: If I asked you to draw the parametric curve of the unit circle, would you say that the form <span class="math-container">$$x(t) = \cos(t)$$</span> <span class="math-container">$$y(t) = \sin(t)$$</span></p> <p>Is different than saying <span class="math-container">$$x(t) = \sin(t + \pi / 2)$$</span> <span class="math-container">$$y(t) = \cos(t + \pi / 2)$$</span> Both produce the unit circle; one way just draws it counterclockwise while the other draws it clockwise. But both equations draw the same thing.</p> <p>Searching the Gamma Distribution online will be able to explain better why different parametrizations exist. It depends on the contents of different problems and how the Gamma Distribution is brought up.</p>
https://math.stackexchange.com/questions/2979196/whats-the-difference-between-gammaalpha-lambda-and-gammaalpha-beta
Question: <p>I am sorry for the poor quality of this question: For <span class="math-container">$\Gamma(\alpha,\beta)$</span> random variables, why do we assume <span class="math-container">$\alpha&gt;0$</span> and <span class="math-container">$\beta&gt;0$</span>?</p> Answer: <p>The gamma density is the following, for <span class="math-container">$x&gt;0$</span></p> <p><span class="math-container">$$f_X(x,a,b)=\frac{b^a}{\Gamma(a)}x^{a-1}e^{-bx}$$</span></p> <p>it is easy to prove that its integral cannot converge if <span class="math-container">$a,b$</span> are not both positive</p>
https://math.stackexchange.com/questions/4170608/positive-parameters-for-gamma-random-variables
Question: <p>I apologize for the title. I am not even sure how to phrase this question per se. I feel like this should be easy and yet I am questioning my thinking. Here's the scenario:</p> <p>I have two groups. Group A has 50 members. Group B has 400 members. What I want to know is what the calculation would be to adjust Group A to have the same &quot;influence&quot; on its other metrics (as if it also had 400 members). So, if Group A had 50 followers and, for their last 1,000 tweets has a mean of 5 likes, what would be the number that I would use to multiply against the mean of 5 likes?</p> <p>Example: Group A: 50 followers, mean of 5 likes, total tweets 1,000 Group B 400 followers, mean of 20 likes, total tweets 1,000</p> <p>Since Group B has 8X the number of followers, it would be obvious that they will have more likes (as they are reaching more people). Is it as simple to say that Group A's 5 likes would need to be multiplied by 8 to adjust Group A to be the same as Group B?</p> <p>Thanks for your assistance!</p> Answer: <p>Comment continued with results from test procedures in R:</p> <pre><code>prop.test(c(5,20),c(50,400), cor=F) 2-sample test for equality of proportions without continuity correction data: c(5, 20) out of c(50, 400) X-squared = 2.1176, df = 1, p-value = 0.1456 alternative hypothesis: two.sided 95 percent confidence interval: -0.03585336 0.13585336 sample estimates: prop 1 prop 2 0.10 0.05 Warning message: In prop.test(c(5, 20), c(50, 400), cor = F) : Chi-squared approximation may be incorrect </code></pre> <p>Notice the warning message, triggered by the small counts in the first group. Because the P-value is so far above 5%, rejecting <span class="math-container">$H_0$</span> seems out of reach. But we don't need to speculate because Fisher's exact test gives a reliable P-value that is even larger.</p> <pre><code>fisher.test(TBL)$p.val [1] 0.1931484 </code></pre>
https://math.stackexchange.com/questions/4176527/basic-math-question-i-think
Question: <p>In an office of 20 people ther are only 4 salary levels paid : 50 000 (1 person), 42 000 (3 people), 35 000 (6 people), 28 000 (10 people).</p> <p>I calculate the mean = 33300, the median = 30000 (usd).</p> <p>But I am not sure which measure of central tendency might be used by the boss who is against a pay rise for other employees. Help me, many thanks.</p> Answer: <p>The median of <span class="math-container">$30,000$</span> is more convincing because the people who are making <span class="math-container">$28000$</span> are only <span class="math-container">$2,000$</span> below the median while the rest of them are making much higher than the median.</p> <p>Thus more people feel good about their salary if compared with the median than comparing their salary with the mean.</p>
https://math.stackexchange.com/questions/2993373/which-measure-of-central-tendency-might-be-used-by-the-boss-who-is-against-a-pay
Question: <p>A sample of $40$ women is obtained and their heights in inches and pulse rate in beats per minute are measured. The linear correlation coefficient is $0.221$ and the equation of the regression line is $y = 18.5+0.860x$ where $x$ represents height and $y$ the pulse rate. The mean of the $40$ heights is $62.8$ inches and the mean of the $40$ pulse rates is $73.2$ beats per minute. Find the best predicted pulse rate of a woman who is $65$ inches tall (use a significance level of $0.01$).</p> <p>The answer is $73.2$ beats per minute.</p> <p>Can someone explain the steps involved in arriving at the solution?</p> Answer: <p>This is not really an answer because I think something is wrong with the information given. Perhaps you can make some sense of the approach anyway.</p> <p>Regression line: y = 18.5 + 0.86x. If x = 65, then the predicted height is 18.5 + 0.86(65) = 74.4, which is close but not exactly the given answer 73.2.</p> <p>The regression line should go through the center of the data cloud. Let's check that: 18.5 + 0.86(62.8) = 72.508, not 73.2. Strange.</p> <p>Also, the number 73.2 shows up in two different places in your statement.</p> <p>Something is not right here. Suggest you check all of the numbers carefully and edit the problem as necessary.</p> <p>In addition, I do not see the relevance of the correlation coefficient o.221 or of the significance level 0.01. Sometimes word problems have information that is not needed to make sure you're not just plugging aimlessly into formulas, but these numbers do seem out of place.</p>
https://math.stackexchange.com/questions/1178005/statistics-regression
Question: <p>During the log phase of bacterial growth the size of the colony grows exponentially. Let <span class="math-container">$R$</span> be the ratio of the biomass at time 1 hour to the initial biomass. Then <span class="math-container">$R=e^r$</span> where <span class="math-container">$r$</span> is the instantaneous growth rate. Assume that this ratio has mean <span class="math-container">$\mu_R=1.3$</span> and standard deviation <span class="math-container">$\sigma_R=.2$</span>. Compute <span class="math-container">$P\{ \bar{R}&gt;1.55\}$</span>.</p> <p>Can someone help me understand if part (b) is correct or not?</p> <p>(b)<span class="math-container">$P\{\bar{R}&gt;1.55\}=P\{\frac{\bar{R}-1.3}{(.2/5)}&gt;\frac{1.55-1.3}{(.2/5)}\}=2.06 \times 10^{-10}$</span> (This does not seem right)</p> <p>It does not seem right to me, but I cannot think of any other way to do it.</p> <p>Here <span class="math-container">$\mu_{\bar{R}}=1.3$</span> and <span class="math-container">$\sigma_{\bar{R}}=.2/5$</span>.</p> Answer:
https://math.stackexchange.com/questions/4183246/determining-probability-after-standardizing-for-given-problem
Question: <p>Imagine a 10 x 5 grid where each square can be either 1 or 0. However, each row (10 squares) must contain five 1's and five 0's. Therefore, each grid (of 50 squares) has twenty five 1's and twenty five 0's but their distribution is somewhat controlled in that each row must contain five of each.</p> <p>How many possible combinations of grids can this produce?</p> Answer: <p>For each row, choose five positions to have 1's. The remaining 5 positions have zeros. Do this for each row.</p> <p>That is:</p> <p><span class="math-container">$$\dbinom{10}{5}^5 = 252^5$$</span></p>
https://math.stackexchange.com/questions/3153176/how-many-possibilities-can-a-10x5-grid-with-somewhat-even-distribution-produce
Question: <p>I work for a law firm and I want to know whether I can accurately predict our future revenue based on data I've pulled from our SQL Server database. Here is the information that I know based on some queries:</p> <ol> <li><p>It takes on average, 333 days from the time we sign up a client until we get a settlement and earn revenue.</p> </li> <li><p>I've also calculated the 25th, 50th, and 75th percentile in days to a settlement from the time we sign the client up. Those numbers are 231, 327, and 476.5 respectively.</p> </li> <li><p>The average fee for a case is $10,000.</p> </li> <li><p>At the 25th percentile and above, we have 894 cases that have been open longer than 231 days and no fee has been earned yet. At the 50th percentile and above we have 707 cases. At the 75th percentile we have 431.</p> </li> </ol> <p>Is it possible to predict, based on those numbers, what our revenue ought to be over the next 30 days? Or another future time period?</p> <p>If I'm missing data that I need what is it?</p> <p>I'd really appreciate any help. Thanks!</p> Answer:
https://math.stackexchange.com/questions/4186587/how-to-forecast-revenue-with-my-data
Question: <p>I work on 'real-life data' and to simplify, I have a sample of 10.000 observations of two variables <span class="math-container">$X$</span> and <span class="math-container">$Y$</span> with a categorical variable <span class="math-container">$C$</span> that is either <span class="math-container">$C=0$</span> or <span class="math-container">$C=1$</span>.</p> <p>When I look for the pearson correlation coefficient between <span class="math-container">$X$</span> and <span class="math-container">$Y$</span> over the whole data, I get <span class="math-container">$0.35$</span>. But when I differentiate data with <span class="math-container">$C=0$</span> from data with <span class="math-container">$C=1$</span> I get coefficients of <span class="math-container">$0.08$</span> and <span class="math-container">$0.32$</span> respectively.</p> <p>Is it something that one would expect ? What is the intuition behind that ? Is there some kind of weighted sum behind these results ?</p> <p>Note that if I look for the Spearman's rank correlation coefficient (suited to non-linear relationships) I get similar results.</p> Answer:
https://math.stackexchange.com/questions/4178919/pearson-correlation-over-subsamples-compared-to-the-whole-sample
Question: <pre><code>Event Trigger Check Interval: 3 minutes Trigger Chance of Event: 5% Event Length: 10 minutes </code></pre> <p>The above are the 3 variables in this problem. To give it a story, let's say I click a button every <strong>3 minutes</strong>, with the first click at minute 3 (not 0). On click, there is a <strong>5% chance</strong> a green light lights up. When the light goes green, it starts raining for the next <strong>10 minutes</strong>, after which point it stops raining. While it's raining, I'll still click the button every 3 minutes, and if the light goes green, the timer will reset to have the rain end 10 minutes from that point in time.</p> <p>What's the average amount of time it'll rain in 3 hours?</p> <hr /> <p>I don't have a background in math or statistics (do in computer science), so I'm unsure how to tackle this problem. Any direction towards theorems or whatnot I can read up on would be helpful.</p> <p>My gut instinct says I should start by figuring out how long it takes to reach a 50% chance that it has started raining, and consider that the average time it'll take to trigger the event.</p> <pre><code>0.95^n = 0.5 n = 13.5 trigger checks 13.5*3 minutes = 40.5 minutes </code></pre> <p>So on average, I can expect to wait 40.5 minutes for it to rain 10 minutes. This leads me to a poor man's solution of 10/40.5 or around 25% uptime of rain. In 3 hours, that's 44.44 minutes.</p> <p>I believe this is &quot;best case&quot; &quot;average&quot; scenario, since it's thinking in averages, but without any overlap of the trigger happening, so the real answer will be lower than 25%.</p> <p>How does this change if there's a wait period between when it starts to rain, and a second time it can rain again. For example, after it starts raining, it takes 45 minutes until I can start clicking the button again (which is 35 minutes after the rain has ended).</p> <p>Thank you very much for your time!</p> Answer: <p>If I understand correctly, of the <span class="math-container">$(180)$</span> minutes to be considered, you want <span class="math-container">$\sum_{i=1}^{180} f(i)$</span>, where <span class="math-container">$f(i)$</span> is the probability of rain during the interval from the start of minute <span class="math-container">$(i)$</span> to the end of minute <span class="math-container">$(i)$</span>.</p> <p>Further, (again) if I understand correctly, the relevant trigger checks will occur at the <strong>end</strong> of <span class="math-container">$k$</span> minutes, where <span class="math-container">$k \in \{3,6,9, \cdots, 177\}.$</span></p> <p>Also, for <span class="math-container">$1 \leq i \leq 3, f(i) = 0.$</span></p> <p>In general, for any <span class="math-container">$i \geq 3, f(i)$</span> will depend on the number of pertinent trigger checks. For any <span class="math-container">$i \geq 13$</span>, this will specifically depend on the congruency class of <span class="math-container">$(i) \pmod{3}.$</span></p> <p>For example, if <span class="math-container">$i = 25$</span> then <span class="math-container">$f(i)$</span> is affected by whether any of the <strong>four</strong> trigger checks at <strong>the end of</strong> <span class="math-container">$15, 18, 21,$</span> or <span class="math-container">$24$</span> minutes caused rain. Alternatively, if <span class="math-container">$i = 26$</span> or <span class="math-container">$27$</span>, then <span class="math-container">$f(i)$</span> is affected only by the <strong>three</strong> trigger checks at the end of <span class="math-container">$18, 21,$</span> or <span class="math-container">$24$</span> minutes.</p> <hr /> <p>However, while the above analysis illustrates the general considerations, the analysis is <strong>premature</strong>. That is, individual attention must first be given to <span class="math-container">$f(i)$</span> for each <span class="math-container">$i \in \{4,5,6,\cdots, 12\}$</span>.</p> <p>Let <span class="math-container">$p = 0.05, q = 1-p.$</span> If a specific interval can be affected by <span class="math-container">$k$</span> trigger checks, then the chance of rain during that interval is <span class="math-container">$1 - q^k.$</span></p> <p>For <span class="math-container">$i \in \{1,2,3\}, f(i) = 0.$</span> <br> For <span class="math-container">$i \in \{4,5,6\}, f(i) = 1 - q.$</span> <br> For <span class="math-container">$i \in \{7,8,9\}, f(i) = 1 - q^2.$</span> <br> For <span class="math-container">$i \in \{10,11,12\}, f(i) = 1 - q^3.$</span></p> <p>For <span class="math-container">$i \in \{13,14,15, \cdots, 180\}$</span>, there are exactly <span class="math-container">$\frac{180 - 12}{3} = 56$</span> numbers that are congruent to <span class="math-container">$1 \pmod{3}.$</span></p> <p>Therefore, the final computation is :</p> <p><span class="math-container">$(3 \times 0)$</span> <br> <span class="math-container">$+ (3 \times [1 - q])$</span> <br> <span class="math-container">$+ (3 \times [1 - q^2]$</span> <br> <span class="math-container">$+ (3 \times [1 - q^3]$</span> <br> <span class="math-container">$+ (56 \times [1 - q^4]$</span> <br> <span class="math-container">$+ ([180 - 12 - 56] \times [1 - q^3]).$</span></p> <p><strong>Note</strong><br> The above approach makes strong use of <a href="https://brilliant.org/wiki/linearity-of-expectation/" rel="nofollow noreferrer">linearity of expectation</a>.</p>
https://math.stackexchange.com/questions/4187831/event-uptime-over-a-course-of-time
Question: <p>"Consider the mean combined SAT score for high school seniors is 1500, and the standard deviation is 250. Calculate the percentage of students who scored at the following levels"...</p> <p>Can anyone figure out what this question is asking for? I can find a Z-score then a corresponding probability but I don't think that's what they want... </p> Answer: <p>It's difficult to guess from this fragment. If this is at the beginning of using normal distributions in a basic probability or statistics course, my guess is they want you to standardize and use printed normal tables (or possibly software).</p> <p>Assuming that the population is normal with mean $\mu = 1500$ and SD $\sigma = 250,$ you could find proportions of students in the population with scores in various ranges. By the Empirical Rule (essentially exact for normal populations), you would expect 95% of the population to have scores in the interval $\mu \pm 2\sigma$ or $1500 \pm 500.$</p> <p>The exact result from R software is 95.45%: </p> <pre><code> diff(pnorm(c(1000,2000), 1500, 250)) ## 0.9544997 </code></pre> <p>or</p> <pre><code> diff(pnorm(c(-2,2))) ## 0.9544997 </code></pre> <p>To use printed tables of the standard normal distribution, you would begin as follows:</p> <p>$$P(1000 &lt; X &lt; 2000) = P\left(\frac{1000 - 1500}{250} &lt; \frac{X - \mu}{\sigma} &lt; \frac{2000 - 1500}{250} \right) \\= P(-2 &lt; Z &lt; 2) = \dots,$$</p> <p>where $Z$ is standard normal.</p> <p>Similarly, you could find the proportion of the population scoring above 1800, or below 1450, or between 1450 and 1500, and so on.</p> <p>Note: Essentially this is the same guess as in the Comment by @MorganRodgers posted while I was typing my Answer.</p>
https://math.stackexchange.com/questions/1883202/consider-the-mean-combined-sat-score-for-high-school-seniors-is-1500
Question: <p>The relative error is defined by the simple formula:</p> <p>$$\text{Rel. Error} = \frac{|v_\text{approx}-v_\text{analytical}|}{v_\text{analytical}}$$</p> <p>but what if the theoretical value $v_\text{analytical}$ should be $0$? then our relative error is undefined.... this is also quite a common occurs. If our analytical function is $x^2$ then at its $x=0$ we have a problem.</p> <p>I'm trying to program this on a computer. How do I make sure that I don't have any problems with this formula?</p> Answer: <p>You could argue that in that particular case, the relative error is not a good measure.</p> <p>Note that usually the relative error is defined a the ratio of the absolute error and the <em>absolute</em> true value, i.e. $$ \mathrm{Rel. Error} = \frac{ |v_{\mathrm{approx}} - v_{\mathrm{analytical}}| }{ |v_\mathrm{analytical}| }. $$</p> <p>An alternative would be to use just the absolute error or to define the relative error <a href="https://stats.stackexchange.com/a/86710">as follows</a>:</p> <p>$$ \mathrm{Rel. Error} = \frac{ |v_{\mathrm{approx}} - v_{\mathrm{analytical}}| }{ 1+|v_\mathrm{analytical}| }. $$</p>
https://math.stackexchange.com/questions/2502932/what-if-the-relative-error-is-undefined
Question: <p>My textbook mentions this:</p> <p>"To construct a histogram, first decide how many bars or intervals, also called classes, represent the data. Many histograms consist of five to 15 bars or classes for clarity. The number of bars needs to be chosen. Choose a starting point for the first interval to be less than the smallest data value. A convenient starting point is a lower value carried out to one more decimal place than the value with the most decimal places. For example, if the value with the most decimal places is 6.1 and this is the smallest value, a convenient starting point is 6.05 (6.1 – 0.05 = 6.05). We say that 6.05 has more precision. If the value with the most decimal places is 2.23 and the lowest value is 1.5, a convenient starting point is 1.495 (1.5 – 0.005 = 1.495). If the value with the most decimal places is 3.234 and the lowest value is 1.0, a convenient starting point is 0.9995 (1.0 – 0.0005 = 0.9995). If all the data happen to be integers and the smallest value is two, then a convenient starting point is 1.5 (2 – 0.5 = 1.5). <strong>Also, when the starting point and other boundaries are carried to one additional decimal place, no data value will fall on a boundary</strong>."</p> <p>I don't get why it would be wrong if a data value falls on a boundary, can someone please explain?</p> Answer: <p>The intervals in a histogram is a range.</p> <p>So if I made a histogram with bars <span class="math-container">$0-10$</span>, <span class="math-container">$10-20$</span>, <span class="math-container">$20-30$</span>, etc. </p> <p>And a data point said <span class="math-container">$10$</span>, what would do? Would I put it in the first bar or the second bar? </p> <p>We can go around this by making it <span class="math-container">$0-9.99..., 10-20.999...,$</span> etc</p>
https://math.stackexchange.com/questions/3211937/when-creating-histograms-what-is-wrong-with-data-values-falling-on-boundaries
Question: <p>I cannot seem to find a proof that $f(\mathbf{\beta}) = \left\lVert \mathbf{y}-\mathbf{X} \mathbf{\beta} \right\rVert^2$ is an ellipsoid, centered at the OLS solution $\hat{\beta}$. Can anyone show how to convert it to the quadratic form of a general ellipsoid, i.e. $(\beta - \hat{\beta})^T \mathbf{A} (\beta - \hat{\beta})$, where $\mathbf{A}$ is positive definite?</p> Answer: <p>The function $(\beta - \hat{\beta})^\top A (\beta - \hat{\beta})$ is zero when $\beta = \hat{\beta}$, yet $f(\hat{\beta}) = \|y - X \hat{\beta}\|^2$ might not be zero.</p> <p>The form you are looking for is $(\beta - \hat{\beta})^\top A (\beta - \hat{\beta}) + c$ for some vector $c$ (which will turn out to be $\|y - X \hat{\beta}\|^2$). This shows the <em>level sets</em> of $f$ are ellipsoids centered at $\hat{\beta}$.</p> <hr> <p>$\hat{\beta}$ is characterized by $$X^\top y = X^\top X \hat{\beta}.\tag{$*$}$$</p> <p>Using this we have $$ \begin{align} (\beta - \hat{\beta})^\top X^\top X (\beta - \hat{\beta}) &amp;= \beta^\top X^\top X \beta - 2 {\beta}^\top X^\top X \hat{\beta} + \hat{\beta}^\top X^\top X \hat{\beta} \\ &amp;= \beta^\top X^\top X \beta - 2 {\beta}^\top X^\top y + \hat{\beta}^\top X^\top y \\ &amp;= \beta^\top X^\top X \beta - 2 {\beta}^\top X^\top y+ y^\top y - y^\top(y - X\hat{\beta}) \\ &amp;= \|y - X \beta\|^2 - y^\top (y - X\hat{\beta}). \end{align}$$</p> <p>So, $f(\beta) = (\beta - \hat{\beta})X^\top X (\beta - \hat{\beta}) + y^\top (y - X\hat{\beta})$. Note that the additive term $y^\top (y - X \hat{\beta})$ is constant (since it does not depend on $\beta$), and can also be written as $\|y - X \hat{\beta}\|^2$ using the normal equation ($*$).</p> <p>$$f(\beta) = (\beta - \hat{\beta})X^\top X (\beta - \hat{\beta}) + \|y - X \hat{\beta}\|^2.$$</p>
https://math.stackexchange.com/questions/2909077/proof-that-loss-function-for-linear-regression-is-an-ellipsoid
Question: <blockquote> <p>If <span class="math-container">$U$</span> and <span class="math-container">$X$</span> are random variables such that <span class="math-container">$E(U|X)=0$</span>, then <span class="math-container">$E(U)=0$</span>.</p> </blockquote> <p>Really? how to prove?</p> Answer: <p><span class="math-container">$E(U\mid X)$</span> is actually a random variable which is a certain function of <span class="math-container">$X$</span> (say, <span class="math-container">$g(X)$</span> for instance). There's a property that says that if you take its expectation you get <span class="math-container">$$E\big(E(U\mid X)\big)=E(U).$$</span></p> <p>So, <span class="math-container">$$E(U)=E\big(E(U\mid X)\big)=E(0)=0.$$</span></p>
https://math.stackexchange.com/questions/2924578/if-eux-0-then-eu-0
Question: <p>Let <span class="math-container">$X_1, X_2, \ldots, X_n$</span> be i.i.d exponential random variables with parameter <span class="math-container">$\lambda$</span>, where the form of the distribution for each <span class="math-container">$x_i$</span> is</p> <p><span class="math-container">$$f(x_i) =\lambda e^{-\lambda x_i}.$$</span></p> <p>The m.l.e of <span class="math-container">$\lambda$</span> when there isn't censoring is <span class="math-container">$\frac{n}{x_1+x_2+\dots+x_n}$</span>.</p> <p>The expectation of this estimate (<span class="math-container">$=\frac{n\lambda}{n-1}$</span>) can be directly calculated using the fact that the sum of iid exponentials is distributed as gamma (with parameters <span class="math-container">$n$</span> and <span class="math-container">$\lambda$</span> in this example). </p> <p>Now, suppose only the first <span class="math-container">$r$</span> events will be collected and the remaining <span class="math-container">$n-r$</span> will be censored. The form of the m.l.e of <span class="math-container">$\lambda$</span> will be </p> <p><span class="math-container">$\frac{r}{(x_1+\dots+x_r) + (x_{r+i}+\dots+x_n)}$</span>, where the observations <span class="math-container">$x_1,\ldots,x_n$</span> are observed event times and the <span class="math-container">$x_{r+1},\ldots,x_n$</span> are the censored times. Is there a direct way to calculate the expectation of this estimate?</p> <p>EDIT - I was able to find information about exponential order statistics that enabled me to calculate the expectation directly (Cox and Oakes, "Analysis of Survival Data"...page 38)</p> Answer:
https://math.stackexchange.com/questions/2928389/expectation-of-mle-for-exponential-r-v-s-with-censoring
Question: <p>This questions was proposed by our statistics teacher as home work.</p> <p>I have been looking for any reasonable explanation but so far I am getting more and more confused differentiating between the two concepts.</p> <p>Could someone please clarify them for me?</p> Answer: <p>If A and B are independent <span class="math-container">$$P(A \cap B)=P(A)P(B)$$</span></p> <p>If they are mutually exclusive then <span class="math-container">$$P(A \cap B)=0$$</span></p> <p>So the only way that two outcomes can be both independent and mutually exclusive is if at least one of the outcomes occurs with zero probability</p>
https://math.stackexchange.com/questions/2941568/is-there-any-relation-between-a-independece-of-a-event-and-a-mutual-exclusive-ev
Question: <p>There are two groups of people, target and neutral</p> <p>There are two group of events X and others</p> <p>We're making assumption that people from target group react on event X very different to others.</p> <p>We have some sets of reaction numeric values on different type of events by those two groups. And after running Student's <code>T-Test</code> in excel I get <code>0.032</code> for target group and <code>0.55</code> for others so I can tell that target group react on X different but is it possible to measure how much different in <code>0-100</code> range?</p> <p>example of data set (not real data set) for both groups looks like</p> <pre><code>30, 20, 45, 15, 26 ... - reaction on X event 10, 14, 22, 8, 13 ... - reactions on other events </code></pre> <p>What can I use to measure how much reaction <code>X</code> different (alike in T-Test) to reaction on other events in <code>0-100</code> range and is it possible in general?</p> Answer: <p>If the data are approximately normal then use a <a href="https://en.wikipedia.org/wiki/Welch%27s_t-test" rel="nofollow noreferrer">Welch 2-sample t test</a>. This test does not assume that the two groups are sampled from populations with equal <em>variances.</em></p> <p>When you mention the <code>0-100</code> range, perhaps you mean the P-value which gives the probability of a more extreme difference between groups than observed in your data, if the two groups are really equal (null hypothesis). A common standard is to reject the null hypothesis that the groups are equal if the P-value is less than 5%. Most statistical software computes the P-value of the test. Here is one description of the <a href="http://www.real-statistics.com/students-t-distribution/two-sample-t-test-uequal-variances/" rel="nofollow noreferrer">Welch test in Excel</a>.</p>
https://math.stackexchange.com/questions/2971770/how-to-calculate-statistical-difference-of-two-samples-in-0-100-range
Question: <p>The question is as follows:</p> <p>Let X be a variable with bin(25,p)-distribution. We test <span class="math-container">$H_{0}$</span>: p <span class="math-container">$\geq$</span> 0.4 against <span class="math-container">$H_{1}$</span>: p &lt; 0.4. If we want a power function of at least 0.6 in p = 0.3, how large must we choose the size of the test at least?</p> <p>I'm not really sure what the right approach is here. Do I have to compute the critical region first?</p> <p>I know the critical region is like: {0,...,<span class="math-container">$c_{\alpha_{0}}$</span>}, and</p> <p><span class="math-container">$P_{0.3}$</span>(X<span class="math-container">$\leq c_{\alpha_{0}}$</span>) <span class="math-container">$\geq$</span> 0.6, to compute this I can use the normal approximation. </p> <p>Can someone tell me what the approach is? :) Thanks</p> Answer: <p>Out of the four quantities significance level <span class="math-container">$\alpha,$</span> power, sample size, and difference <span class="math-container">$\Delta$</span> detected, a power computation typically specifies three and finds the remaining one. </p> <p>The following power curve from Minitab uses <span class="math-container">$\alpha = 0.05, n = 25, \Delta = .4 -.3 = .1,$</span> and shows power for a range of 'comparison' values (.3 above).</p> <p>With <span class="math-container">$\alpha = 0.05,$</span> the rejection region is too small to get 0.6 power against <span class="math-container">$\mu_a = .3.$</span> So you need larger <span class="math-container">$\alpha.$</span> What critical value <span class="math-container">$c$</span> gives power 0.6? What <span class="math-container">$\alpha$</span> is implied by that?</p> <p>Maybe this will help you clarify a productive approach to your Question.</p> <p><a href="https://i.sstatic.net/6RqHs.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6RqHs.png" alt="enter image description here"></a></p>
https://math.stackexchange.com/questions/2983953/minimum-size-of-test-given-that-power-function-is-at-least-0-6-in-p-0-3
Question: <p>In a example about U-statistics, <span class="math-container">$h(x_1,x_2)=\frac 12(x_1-x_2)^2$</span>, then <span class="math-container">$$U_n=\frac{2}{n(n-1)}\sum_{i&lt;j}\frac{(X_i-X_j)^2}{2}=\frac{1}{n-1}\sum_{i=1}^{n}(X_i-\bar{X})^2$$</span> I don't know how to prove it completely.</p> Answer: <p>We know that (I found it <a href="https://math.stackexchange.com/questions/1187687/expansion-of-the-square-of-the-sum-of-n-numbers">here</a>) <span class="math-container">\begin{equation} \left( \sum_{n=1}^N a_n \right)^2 = \sum_{n=1}^N a_n^2 + 2 \sum_{j=1}^{N}\sum_{i=1}^{j-1} a_i a_j \end{equation}</span> So using the above identity</p> <p><span class="math-container">\begin{align} \sum_{i=1}^{n}(X_i-\bar{X})^2 &amp;= \sum_{i=1}^{n}(X_i-\frac{1}{n}\sum_{j=1}^nX_j)^2\\ &amp;= \sum_{i=1}^{n}(X_i^2-\frac{2}{n}X_i\sum_{j=1}^nX_j + \frac{1}{n^2}(\sum_{j=1}^nX_j)^2 )\\ &amp;= \sum_{i=1}^{n}(X_i^2-\frac{2}{n}X_i\sum_{j=1}^nX_j + \frac{1}{n^2}(\sum_{j=1}^nX_j^2 + 2\sum_{j=1}^n\sum_{k=1}^{j-1}X_jX_k) ) \end{align}</span> The last term above is independent of <span class="math-container">$i$</span> so it sums up <span class="math-container">$n$</span> times as <span class="math-container">\begin{align} \sum_{i=1}^{n}(X_i-\bar{X})^2 &amp;= \sum_{i=1}^{n}(X_i^2-\frac{2}{n}X_i\sum_{j=1}^nX_j) + \frac{n}{n^2}(\sum_{j=1}^nX_j^2 + 2\sum_{j=1}^n\sum_{k=1}^{j-1}X_jX_k) \end{align}</span> which is also <span class="math-container">\begin{align} \sum_{i=1}^{n}(X_i-\bar{X})^2 &amp;= \sum_{i=1}^{n}(X_i^2-\frac{2}{n}X_i\sum_{j=1}^nX_j) + \frac{1}{n}(\sum_{j=1}^nX_j^2 + 2\sum_{j=1}^n\sum_{k=1}^{j-1}X_jX_k) \end{align}</span> which could also be written as <span class="math-container">\begin{align} \sum_{i=1}^{n}(X_i-\bar{X})^2 &amp;= (1 + \frac{1}{n}) \sum_{i=1}^{n}X_i^2-\frac{2}{n}\sum_{i=1}^{n}X_i\sum_{j=1}^nX_j) + \frac{1}{n}( 2\sum_{j=1}^n\sum_{k=1}^{j-1}X_jX_k) \end{align}</span> Rewriting differently we have <span class="math-container">\begin{align} \sum_{i=1}^{n}(X_i-\bar{X})^2 &amp;= (1 + \frac{1}{n}) \sum_{i=1}^{n}X_i^2-\frac{2}{n}\sum_{i,j}X_iX_j + \frac{2}{n}\sum_{i&lt;j}X_iX_j \end{align}</span> The last two terms above are the same terms with missing terms. Notice that <span class="math-container">$\sum_{i,j}X_iX_j$</span> spans all <span class="math-container">$i = 1 \ldots n$</span> and <span class="math-container">$j = 1 \ldots n$</span> but the other one spans an upper triangular version of it. This means that their difference will span the lower triangular version of it as <span class="math-container">\begin{align} \sum_{i=1}^{n}(X_i-\bar{X})^2 &amp;= (1 + \frac{1}{n}) \sum_{i=1}^{n}X_i^2 - \frac{2}{n}\sum_{i\geq j}X_iX_j \end{align}</span> Factor <span class="math-container">$n$</span> on the right hand side, then divide by <span class="math-container">$n-1$</span> on both sides, then Multiply/divide by <span class="math-container">$2$</span> on the right hand side <span class="math-container">\begin{align} \frac{1}{n-1} \sum_{i=1}^{n}(X_i-\bar{X})^2 &amp;= \frac{2}{n(n-1)} \Big( \frac{(n + 1) \sum_{i=1}^{n}X_i^2 - 2\sum_{i\geq j}X_iX_j}{2} \Big) \end{align}</span> Notice that <span class="math-container">$i \geq j$</span> could be split to two summations <span class="math-container">\begin{align} \frac{1}{n-1} \sum_{i=1}^{n}(X_i-\bar{X})^2 &amp;= \frac{2}{n(n-1)} \Big( \frac{(n + 1) \sum_{i=1}^{n}X_i^2 - 2\sum_{i = j}X_iX_j - 2\sum_{i &gt; j}X_iX_j}{2} \Big) \end{align}</span> but when <span class="math-container">$i = j$</span>, it is the same as a single summation, hence <span class="math-container">\begin{align} \frac{1}{n-1} \sum_{i=1}^{n}(X_i-\bar{X})^2 &amp;= \frac{2}{n(n-1)} \Big( \frac{(n + 1) \sum_{i=1}^{n}X_i^2 - 2\sum_{i=1}^n X_i^2 - 2\sum_{i &gt; j}X_iX_j}{2} \Big) \end{align}</span> which gives <span class="math-container">\begin{align} \frac{1}{n-1} \sum_{i=1}^{n}(X_i-\bar{X})^2 &amp;= \frac{2}{n(n-1)} \Big( \frac{(n -1) \sum_{i=1}^{n}X_i^2- 2\sum_{i &gt; j}X_iX_j}{2} \Big) \end{align}</span> The numerator above is nothing other than <span class="math-container">$\sum_{i&lt;j} (X_i - X_j)^2 = \sum_{i&lt;j} X_i^2 - 2 \sum_{i&lt;j} X_iX_j + \sum_{i&lt;j} X_j^2$</span>. It is easy to see the cross terms, however it is not as straightforward to see that we have <span class="math-container">$n-1$</span> terms of the form <span class="math-container">$X_i^2$</span>. This should conclude <span class="math-container">\begin{align} \frac{1}{n-1}\sum_{i=1}^{n}(X_i-\bar{X})^2 = \frac{2}{n(n-1)}\sum_{i&lt;j}\frac{(X_i-X_j)^2}{2} \end{align}</span></p>
https://math.stackexchange.com/questions/3045070/how-to-prove-that-sum-ijx-i-x-j2-n-sum-i-1nx-i-barx2
Question: <p>We have an estimator <span class="math-container">$\hat{X}$</span> of <span class="math-container">$N$</span> which takes values in <span class="math-container">$\{1,2,\cdots,N\}$</span> with the following mass function: <span class="math-container">$$P_N(\hat{X}=k) = \left(\frac{k}{N}\right)^n-\left(\frac{k-1}{N}\right)^{n}.$$</span> We are given the hypothesis <span class="math-container">$$H_0:N=20, H_1:N=22$$</span> and we know that <span class="math-container">$N\in\{20,22\}.$</span></p> <p>I am not sure how to find the rejection region and the boundary of the region knowing that the significance level of the test is <span class="math-container">$\alpha = 0.05.$</span></p> <p>I think that we reject when <span class="math-container">$N=22.$</span> But I am not sure how to account for <span class="math-container">$\alpha$</span> in this computation. Any hints will be much appreciated. </p> Answer: <p>I suspect you mean to say you would reject <span class="math-container">$H_0$</span> when <span class="math-container">$\hat{X}=22$</span>. You would also reject <span class="math-container">$H_0$</span> when <span class="math-container">$\hat{X}=21$</span> since that too is inconsistent with <span class="math-container">$N=20$</span>. </p> <p>You take <span class="math-container">$\alpha$</span> into account in deciding whether to reject <span class="math-container">$H_0$</span> when <span class="math-container">$\hat{X}=20$</span> or particular smaller values. For that you need some calculations</p> <ul> <li>If <span class="math-container">$H_0$</span> is true and <span class="math-container">$N=20$</span>, then <span class="math-container">$P_{20}(\hat{X} \ge k) = \left(\frac{20}{20}\right)^n-\left(\frac{k-1}{20}\right)^{n}$</span>. </li> <li>You want this to be as big as possible but less than or equal to <span class="math-container">$\alpha=0.05$</span>. </li> <li>Solving <span class="math-container">$\left(\frac{20}{20}\right)^n-\left(\frac{k-1}{20}\right)^{n} \le 0.05$</span> requires <span class="math-container">$\left(\frac{k-1}{20}\right)^{n} \ge 0.95$</span> and so <span class="math-container">$k\ge 1+20\sqrt[n]{0.95}$</span></li> <li>This then gives a rejection region when <span class="math-container">$\hat{X} \ge 1+20\sqrt[n]{0.95}$</span></li> </ul> <p>Note that the answer depends on <span class="math-container">$n$</span>, which you have not specified. </p> <p>In practice, since <span class="math-container">$\hat{X}$</span> is an integer and by the two hypotheses cannot exceed <span class="math-container">$22$</span>, the rejection region for <span class="math-container">$\alpha=0.05$</span> would be when <span class="math-container">$\hat{X} \in \{20,21,22\}$</span> when <span class="math-container">$n=1$</span> and <span class="math-container">$\hat{X} \in \{21,22\}$</span> when <span class="math-container">$n \gt 1$</span> </p>
https://math.stackexchange.com/questions/3072496/easy-hypothesis-testing-in-discrete-case-uniform-distribution
Question: <p>in my wordbook it is said to be true, but I would like to know how to prove it. Let <span class="math-container">$X_1,X_2,...,X_n$</span> be distributed <span class="math-container">$Exp(\lambda)$</span> and <span class="math-container">$T(X_1,X_2,...,X_n)=X_1+X_2+...+X_n$</span> Prove that statistics T is sufficient.</p> <p>The density of <span class="math-container">$(X_1,X_2,...,X_n)$</span> is <span class="math-container">$f_\lambda(X)=\lambda^ne^{-\lambda nx}$</span> on <span class="math-container">$x\in&lt;0,\infty)$</span> the thing is to present this density as a product <span class="math-container">$f_\lambda(X)=g_\lambda(T(X))h(X)$</span>, but I have no idea how to do it, as <span class="math-container">$T(X)$</span> is a sum of coordinates of vector <span class="math-container">$X$</span></p> Answer: <p>Hint:</p> <p>Calculate the mutual density</p> <p><span class="math-container">$$f_\lambda(X_1, \dots, X_n) = \prod_{i=1}^n f_\lambda (X_i)$$</span> and the sum you are looking for will apear. </p>
https://math.stackexchange.com/questions/3085755/prove-that-statistics-is-sufficient
Question: <p>They were talking about volcanoes today on TV, specifically the Popocatépetl and the threat of pyroclastic flows if a Plinian eruption happened. It was mentioned that because an eruption didn't occur in 1000 years (AD 800) there is an increasing probability. Popular science, so intuitive, but what can be calculated exactly and how?</p> <p>So the question is, if we know the mean time between two events, possibly variance, and date of last occurrence, what should be used to describe the next occurrence or "threat"? Like probability on a daily basis?</p> <p>This looks like a beginner's question, sorry, my last statistics class was long ago. I think that Bayes' formula is involved here but don't know how to transform the mean time to the yes/no question "will event occur today".</p> Answer:
https://math.stackexchange.com/questions/3168750/probability-on-a-time-basis
Question: <p>If we think about a random variable following a discrete distribution then I can accept the association of a discrete value in data to the variable. For example, let's talk about n independent basketball shots each with probability p of making it into the hoop. The number of shots that make it in is distributed <span class="math-container">$X \sim Binomial(n,p)$</span>. In theoretical sports leagues we could report on this number: player A made 5 shots out of 12, and so forth, etc. So in this example the variable crystallizes to some discrete value <span class="math-container">$X =5$</span>, or we associate a discrete value to this data from a discrete distribution.</p> <p>My point of confusion is now if we consider some data or crystallization of variables from continuous distributions. The immediate example I can think of is grades on an exam. Professors always say that there was a normal distribution of grades. But when you actually refer to the grade received on your exam or my exam, these are discrete numbers. Yet, still, we associate that discrete outcome of a grade to some continuous random variable!</p> <p>It is well known in probability theory that <span class="math-container">$P(X=x)=0$</span> for any continuous variable <span class="math-container">$X$</span>. That is, the probability that the test score, a continuous random variable that is normally distributed, is ever equal to some discrete value should be <span class="math-container">$0$</span>. Then how come your score or my score on the exam is some discrete number, like 80 or 90 out of 100? Why are we associating discrete values to data from a continuous distribution? What is the fallacy in logic here? Is this some misnomer that we make when we are not rigorously saying that test scores follow a normal distribution? </p> <p>Finally, it seems like the concept of a continuously distributed random variable is really intractable to untrained intuition. Could it be some part of developmental psychology that explains it? Let me explain why it seems so to me:</p> <p>When we say <span class="math-container">$B \sim Binomial(n,p)$</span> then we can mean to say that <span class="math-container">$B$</span> takes at least some value <span class="math-container">$x \in \mathbb{R}$</span> with nonzero probability. But when we say <span class="math-container">$N \sim Normal(\mu,\sigma^2)$</span> we mean to say <span class="math-container">$N$</span> can never take any value <span class="math-container">$x \in \mathbb{R}$</span> with a nonzero probability. This seems very frustrating because at first instinct we use random variables to model outcomes, and by human nature tend to associate outcomes as only discrete. For example, most people's first encounter with distributions of variables will be in grade school when the teacher says "oh, that history exam's grade were on this normal curve" and then pulls up some symmetric bell curve on the projector. Obviously later we learn that instead of just a particular value, we can model the probability that some value falls within an infinitesimal range and that's when the density functions of continuous variables become particularly valuable. But perhaps it's what we learn first that irreversibly colours our instinct?</p> <p>I hope my point is clear. It seems that in conventional principle we still associate discrete outcomes with continuous variables! Why is that? </p> Answer: <p>Here is a distinction between discrete and continuous random variables that I think you may find useful.</p> <p><strong>Discrete random variable:</strong> Suppose a random variable can take integer values <span class="math-container">$0, 1, 2, \dots, 10.$</span> A random variable <span class="math-container">$X \sim \mathsf{Binom}(10, p)$</span> is an example. Then we specify the distribution of <span class="math-container">$X$</span> by somehow giving the probability that <span class="math-container">$X$</span> takes each of these possible values. This can be done by making a table, making a bar chart, or giving an equation. If <span class="math-container">$p = 1/2,$</span> then the equation is <span class="math-container">$$P(X = k) = {10 \choose k}(1/2)^n,$$</span> for <span class="math-container">$k = 0, 1, \dots, 10.$</span> </p> <p>In R statistical software, I can make a table of probabilities correct to ten decimal places as follows (you can ignore the row numbers in brackets <code>[ ]</code>.)</p> <pre><code>k = 0:10; PDF = dbinom(k, 10, .5) cbind(k, PDF) k PDF [1,] 0 0.0009765625 [2,] 1 0.0097656250 [3,] 2 0.0439453125 [4,] 3 0.1171875000 [5,] 4 0.2050781250 [6,] 5 0.2460937500 [7,] 6 0.2050781250 [8,] 7 0.1171875000 [9,] 8 0.0439453125 [10,] 9 0.0097656250 [11,] 10 0.0009765625 </code></pre> <p>And here is a bar chart:</p> <p><a href="https://i.sstatic.net/Ouyql.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Ouyql.png" alt="enter image description here"></a></p> <p>Whether we give the probabilities by formula, table, or barchart, the idea is the same: <em>In order to specify the distribution of a discrete random variable, we need to give the probability of each possible point value.</em></p> <p><strong>Continuous random variable.</strong> A beta random variable can take any value in the interval <span class="math-container">$(0, 1),$</span> which is called the <em>support</em> <span class="math-container">$S_X$</span> of the random variable. We use a density function to specify the distribution of a continuous random variable. A density function <span class="math-container">$f(x)$</span> has three rules: </p> <p>(a) <span class="math-container">$f(x) \ge 0,$</span> for all <span class="math-container">$x \in S_X.$</span></p> <p>(b) The area under the the density function over <span class="math-container">$S_X$</span> must be <span class="math-container">$1.$</span> Using an integral, this can be stated as <span class="math-container">$\int_{S_X} f(x)\, dx = 1.$</span> For a beta distribution in particular it's <span class="math-container">$\int_0^1 f(x)\, dx = 1.$</span></p> <p>(c) The probability <span class="math-container">$P(a &lt; X \le b)$</span> for <span class="math-container">$a &lt; b; a,b \in S_X$</span> is the area under the density function over the interval <span class="math-container">$(a,b].$</span> In terms of an integral, this is can be written as <span class="math-container">$\int_a^b f(x)\, dx.$</span></p> <p>This means that <em>we define probabilities only for intervals</em> and the probability <span class="math-container">$P(X = a) = 0$</span> for any one point <span class="math-container">$a.$</span> Hence, intervals <span class="math-container">$(a,b), [a,b), (a,b],$</span> and <span class="math-container">$[a,b]$</span> (where <span class="math-container">$a &lt; b)$</span> all have the same probability.</p> <p>For example, the density function of the distribution <span class="math-container">$\mathsf{Beta}(2, 1)$</span> is <span class="math-container">$f(x) = 2x,$</span> for <span class="math-container">$0 &lt; x &lt; 1.$</span> Clearly, this definition satisfies condition (a), and a simple integration (or some elementary school geometry) shows that <span class="math-container">$\int_0^1 f(x)\,dx = \int_0^1 2x\,dx = 1,$</span> so that (b) is satisfied. </p> <p>We can use condition (c) to find <span class="math-container">$P(0.1 &lt; X &lt; 0.6) = \int_{.1}^{.6} 2x \, dx = 0.35$</span>.</p> <p>Here is a graph of the density function. The area between the vertical dotted lines is <span class="math-container">$P(0.1 &lt; X &lt; 0.6).$</span></p> <p><a href="https://i.sstatic.net/B73zK.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/B73zK.png" alt="enter image description here"></a></p> <p><em>Note:</em> For some important continuous distributions, the integration in (c) has to be done by numerical methods instead of using calculus. The normal distribution is one of those distributions, which is why we use printed normal tables, statistical calculators or software for finding areas under a normal curve.</p> <p><strong>Distinctions.</strong> Colloquially speaking, discrete distributions 'live on' a finite or countable number of discrete <strong>points</strong>. For <span class="math-container">$X \sim \mathsf{Binom}(10, .5),$</span> if you want <span class="math-container">$P(3 \le X \le 5) = 0.5683594.$</span> then you have to get the probability of this 'interval' by adding the probabilities of the three relevant points (3, 4, and 5). </p> <p>By contrast, continuous distributions 'live on' <strong>intervals</strong>. If <span class="math-container">$Y \sim \mathsf{Norm}(70, 7)$</span> and you ask for <span class="math-container">$P(Y = 77),$</span> then the technical answer is <span class="math-container">$0.$</span> If this distribution is intended to describe the masses (in kg) of collegiate make swimmers, then maybe by <span class="math-container">$P(Y = 77)$</span> you really mean <span class="math-container">$P(76.5 &lt; Y \le 77.5).$</span> Now, <em>that</em> is an <em>interval</em> and you can use normal tables or software to find <span class="math-container">$P(76.5 &lt; Y \le 77.5) = 0.0346.$</span> </p> <pre><code>diff(pnorm(c(76.5, 77.5), 70, 7)) [1] 0.03456723 </code></pre>
https://math.stackexchange.com/questions/3174171/why-do-we-associate-discrete-values-to-data-from-a-continuous-distribution
Question: <p>Here are two seperate question</p> <p>Q1) An observed sample of four observations from a <span class="math-container">$N(u, \sigma^2)$</span> distribution has mean <span class="math-container">$62.75$</span> and standard deviation <span class="math-container">$4.57$</span>. Assess the hypothesis <span class="math-container">$H_0 : u = 66$</span> by computing the relevant p-value</p> <p>Which you just use the formula to get the p value <span class="math-container">$2\left[1 - \Phi(\frac{\bar{x} - u_0}{sd/\sqrt{n}}) \right]$</span></p> <p>in this case <span class="math-container">$\Phi$</span> is a t distribution </p> <p>Q2) Suppose measurements (in centimeters) are taken using an instrument. There is error in the measuring process and a measurement is assumed to be distributed <span class="math-container">$N(µ, σ^2)$</span>, where µ is the exact measurement and <span class="math-container">$σ_0^2 = 0.5.$</span> If the (n = 10) measurements <span class="math-container">$4.7, 5.5, 4.4, 3.3, 4.6, 5.3, 5.2, 4.8, 5.7, 5.3$</span> were obtained, assess the hypothesis <span class="math-container">$H_0 : µ = 5$</span> by computing the relevant P-value. </p> <p>This is the same thing as above except we use <span class="math-container">$z$</span> distribution for <span class="math-container">$\Phi$</span>. Why? </p> Answer: <p>Some confusion here. Perhaps printouts from software will help you get oriented.</p> <p><strong>1) Use t test--with sample standard deviation from data:</strong> In Minitab, the <em>two-sided</em> t test (alternative <span class="math-container">$H_a:\mu \ne 66)$</span> results in the following output:</p> <pre><code>One-Sample T Test of μ = 66 vs ≠ 66 N Mean StDev SE Mean 95% CI T P 4 62.75 4.57 2.29 (55.48, 70.02) -1.42 0.250 </code></pre> <p>Because the P_value exceeds 5%, you cannot reject <span class="math-container">$H_0.$</span> I am not sure how you are supposed to find the P-value in this case. Using a normal approximation is inappropriate because the sample size is so small. By looking at the row for DF = 3 in a printed t table, you can see that the test is not significant at the 5% level. You would have to use statistical software (or a statistical calculator) to find the exact P-value.</p> <p>Using R statistical software (in which <code>pt</code> represents the CDF if a t distribution), I get the same value shown by Minitab.</p> <pre><code>2*pt(-1.42, 3) [1] 0.2506892 </code></pre> <p>In the graph below, the P-value is the sum of the two areas outside the vertical red lines.</p> <p><a href="https://i.sstatic.net/KqVqd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/KqVqd.png" alt="enter image description here"></a></p> <p>You are correct that you would use a t distribution (specifically with 3 degrees of freedom). However the symbol <span class="math-container">$\Phi$</span> is reserved for the <em>standard normal</em> CDF, so your notation is incorrect. [Also, your formula would not work even if you used the CDF of <span class="math-container">$\mathsf{T}(3).$</span>]</p> <p><strong>2) Use z test--population variance is known:</strong> I get <span class="math-container">$\bar X = 4.88$</span> for your <span class="math-container">$n = 10$</span> observations. <em>Because the population variance is known</em> to be <span class="math-container">$0.5,$</span> you will use a z statistic to test <span class="math-container">$H_0: \mu = 5$</span> against <span class="math-container">$H_a: \mu \ne 5.$</span> Here in Minitab output:</p> <pre><code>One-Sample Z Test of μ = 5 vs ≠ 5 The assumed standard deviation = 0.707 N Mean SE Mean 95% CI Z P 10 4.880 0.224 (4.442, 5.318) -0.54 0.591 </code></pre> <p>Once you have the <em>exact</em> <span class="math-container">$Z$</span>-statistic (-0.5367, display rounded to <code>-0.54</code> in Minitab output), you can use normal tables to evaluate the P-value <span class="math-container">$\approx$</span> 0.591 with good accuracy. Again here, you cannot reject.</p> <pre><code>z = (4.880-5)/sqrt(.5/10); z [1] -0.5366563 2*pnorm(z) [1] 0.591505 </code></pre> <p>You should use formulas in your text to verify the key quantities in the Minitab output for both tests.</p>
https://math.stackexchange.com/questions/3185558/when-to-use-t-test-or-z-test-when-computing-p-value
Question: <p>My textbook mentioned this formula without any explanation: </p> <p>s<sub>x</sub> = <span class="math-container">$\sqrt{\frac{{∑fm}^2}{n} − \bar{x}^2}$</span> where s<sub>x</sub> = sample standard deviation <span class="math-container">$\bar{x}$</span> = sample mean</p> <p>I thought the sample standard deviation was: s = <span class="math-container">$\sqrt{\frac{∑(x − \bar{x})^2}{n - 1} }$</span>?</p> Answer:
https://math.stackexchange.com/questions/3214115/what-is-this-formula-for-sample-standard-deviation
Question: <p>Let there be two random variables X and Y. A third random variable Z is defined as Z = X + Y. Suppose we are given <span class="math-container">$f_{XY}$</span> (the joint probability density function of X and Y).</p> <p>How do we calculate <span class="math-container">$f_{ZY}$</span> (the joint probability density function of Z and Y)?</p> Answer: <p>A starndard idea in this type of exercise is to start by fiding the cdf of <span class="math-container">$(Z,Y)$</span>: <span class="math-container">\begin{align*} P(Z \leq z_0, Y \leq y_0) &amp;= P(X + Y \leq z_0, Y \leq y_0) \\ &amp;= \int_{-\infty}^{y_0}\int_{-\infty}^{z_0-y}f_{X,Y}(x,y)dxdy \end{align*}</span> Conclude that <span class="math-container">\begin{align*} f_{Z,Y}(z_0,y_0) &amp;= \frac{\partial^2 P(Z \leq z_0, Y \leq y_0)}{\partial z_0 \partial y_0} \\ &amp;= f_{X,Y}(z_0-y_0,y_0) \end{align*}</span></p>
https://math.stackexchange.com/questions/3216408/how-to-find-joint-pdf-of-z-and-y-where-z-x-y
Question: <p>I have two deep learning classifiers and I want to make a test statistic to compare their performance against each other. The two algorithms have been tested on the same 60 samples and have an accuracy of 78.6% and 91.8% respectively. How do I compare their performance? Would I use Students paired t-test in this scenario?</p> Answer:
https://math.stackexchange.com/questions/3272177/how-to-statistically-compare-the-outcome-of-two-classification-algorithms
Question: <p>I'm trying to get a grasp on genetic inheritance laws. Assuming that chromosomes remain intact, would the 23rd row of Pascal's triangle accurately show the distribution of inheritance from a set of grandparents? The first number would be the occurrences of the 23 chromosomes split 0-23,then 1-22, 2-21 ...22-1, 23-0.</p> <p>Other familial relationships (grandchild, aunt/uncle, niece/nephew, half sibling) have the same 25% as the <em>average</em> transmission, but the pathways are a little more complicated. Would the distribution still be the same?</p> <p>(After reading a comment) To clarify the biological assumptions: There are no double relationships involved. While I have 23 pairs of chromosomes, I know that 23 came from each parent. Each of the 23 chromosomes is distinct, therefore I must look at permutations. From my father, who got 23 from each parent, I'll say 0=grandpa and 1=grandma. Position 23 (xy pair) <em>must</em> be 0 for paternal and 1 for maternal sides. So, I should actually be looking at row 22 instead of row 23 in a Pascal Triangle for the paternal grandparents. On the maternal side, the x chromosome could have come from <em>either</em> parent, so row 23 should the correct one. </p> <p>After doing all of the calculations using n!/x!(n-x)! (using n=23) it struck me that the math is much easier to visualize using Pascal's Triangle or a Galton Box. When looking at DNA test results I want to be able to explain why we do not always inherit exactly 25% from each grandparent. In reality, this average is not going to happen, ever, barring an anomaly such as extreme genetic recombination in a biased direction that would result in the equivalent of 11.5 chromosomes from each grandparent.</p> <p>It's been several decades since I was in college, and I was hoping to confirm that my reasoning is correct before I copy a 20 row Pascal Triangle (the largest I could find) and add rows. And recalculate everything using n=22.</p> Answer: <p>I would say that under normal circumstances, the mother contributes one chromosome in each of the pairs <span class="math-container">$1$</span> to <span class="math-container">$23$</span> and the father contributes the other. Among the <span class="math-container">$23$</span> chromosomes contributed by the mother, each one has a <span class="math-container">$\frac12$</span> probability to come from the maternal grandmother and <span class="math-container">$\frac12$</span> probability to come from the maternal grandfather. I assume each of those probabilities is independent, so the number of chromosomes from the maternal grandmother is a binomial random variable with parameters <span class="math-container">$n = 23$</span> trials and probability <span class="math-container">$p = \frac12$</span> of success on each trial.</p> <p>While it is true that one of the pairs of chromosomes gets extra attention because it (usually) determines biological sex, the father has an <span class="math-container">$X$</span> and <span class="math-container">$Y$</span> chromosome in that pair and a priori (before knowing anything else about a person) we should say that either one is equally likely to be donated (at least to a first-order approximation). Meanwhile the mother has two <span class="math-container">$X$</span> chromosomes, one from the maternal grandmother and one from the maternal grandfather, either of which is equally likely to be donated.</p> <p>I don't think there's any reason to treat the sex chromosomes differently than the others when computing the probability distribution of the number of chromosomes contributed by each grandparent. Yes, it's relatively easy to tell when a particular individual did not get that chromosome from their paternal grandmother, but if we start worrying about that then we also ought to worry about eye color, blood type, and other traits that can easily be used to eliminate possible inheritance of chromosomes.</p> <p>By the way, you don't need to complete a Pascal's triangle to compute the coefficients of a binomial distribution. You can use the fact that <span class="math-container">$$ \binom nk = \frac{n - k + 1}{k} \binom n{k-1}. $$</span> Start with <span class="math-container">$\binom{23}{0} = 1$</span>; multiply by <span class="math-container">$23$</span> to get <span class="math-container">$\binom{23}{1}$</span>; multiply by <span class="math-container">$22$</span> and divide by <span class="math-container">$2$</span> to get <span class="math-container">$\binom{23}{2}$</span>; and so forth.</p>
https://math.stackexchange.com/questions/3363570/pascals-triangle-and-inheritance-laws
Question: <p>there are two samples, both with standard deviation 8.5. If one combines the two samples together, find the relation between the standard deviation and 17.</p> <p>I figure it cannot be determined. But I am not sure how to argue rigorously. Thank you!</p> Answer:
https://math.stackexchange.com/questions/3424318/standard-deviation-of-two-samples
Question: <p>I have a question on this specific question from the past entrance examination of a university.</p> <p><a href="https://www.ism.ac.jp/senkou/kakomon/math_20190820.pdf" rel="nofollow noreferrer">https://www.ism.ac.jp/senkou/kakomon/math_20190820.pdf</a></p> <p>I assume that the mean vector of the d-dimensional vector <span class="math-container">$x$</span> is <span class="math-container">$0_d$</span>, and the variance-covariance matrix is <span class="math-container">$I_d$</span>.</p> <p>Then, I would like to calculate <span class="math-container">$E[x^TAx]$</span>.</p> <p>Here,</p> <ul> <li><span class="math-container">$x$</span> is a column vector,</li> <li><span class="math-container">$A$</span> is a d-dimensional square matrix,</li> <li><span class="math-container">$0_d$</span> is a d-dimensional zero vector,</li> <li><span class="math-container">$I_d$</span> is a d-dimensional identity matrix.</li> </ul> Answer: <p><span class="math-container">$x^TAx=\sum_{i=1}^d \sum_{j=1}^d a_{ij}x_ix_j$</span> where <span class="math-container">$a_{ij}$</span> are elements of <span class="math-container">$A$</span>. </p> <p>Then use linearity of expectation and given variance-covariance matrix.</p>
https://math.stackexchange.com/questions/3459410/expected-value-of-xtax
Question: <p>I've solved the following problem. </p> <blockquote> <p>An electronics firm receives, on the average, fifty orders per week for a particular silicon chip. If the company has sixty chips on hand, use the Central Limit Theorem to approximate the probability that they will be unable to fill all their orders for the upcoming week. Assume that weekly demands follow a Poisson distribution. </p> </blockquote> <p><span class="math-container">$ \mu = \lambda = 50; \sigma = \sqrt\lambda = 5\sqrt2; n = 1$</span></p> <p>Therefore <span class="math-container">$$P(X&gt;60) = 1 - P(X&lt;60) = 1 - P(Z&lt;\frac{60-50}{5\sqrt2}) = 1 - P(Z&lt;\sqrt2) = 0.07927 $$</span></p> <p>But if we apply continuity correction,</p> <p><span class="math-container">$$P(X&gt;60) = 1 - P(Z &lt; \frac{60.5-50}{5\sqrt2}) = 0.0694$$</span></p> <p>So, when and why should I or should I not use continuity correction? </p> Answer: <p>It's usually better to do the continuity correction when approximating an integer-valued distribution by a normal distribution, but it may not make any significant difference when the normal approximation is very accurate, which occurs for Poisson(<span class="math-container">$\lambda$</span>) for very large <span class="math-container">$\lambda$</span>. This is just because <span class="math-container">$\Phi(x)$</span> and <span class="math-container">$\Phi(x+0.5/\sigma)$</span>, where <span class="math-container">$\Phi$</span> is the standard normal CDF, are not really all that different when <span class="math-container">$\sigma$</span> is huge. In this problem <span class="math-container">$\sigma$</span> is just <span class="math-container">$\sqrt{50}$</span> which is not really all that big, so it makes a pretty significant difference.</p> <p>With that being said, software can more directly evaluate the desired quantity without having to use a normal approximation at all. For example you can ask Matlab for poisscdf(60,50,'upper') which gives about 0.0722. You can see that this is somewhat closer to your continuity-corrected result than the other one.</p>
https://math.stackexchange.com/questions/3465210/when-do-you-have-to-apply-continuity-correction
Question: <p>Suppose we are given a non-empty set of two or more points in <span class="math-container">$\mathbb{R}^2$</span>, <span class="math-container">$P$</span>, and we would like to quantify how <em>dense</em> those points are to one another. Let <span class="math-container">$\mathcal{D}(P)$</span> represent the density of the set where <span class="math-container">$0$</span> is not dense at all and <span class="math-container">$1$</span> is very dense.</p> <p>Is there some sort of metric for determining <span class="math-container">$\mathcal{D}(P)$</span>?</p> Answer: <p>If <span class="math-container">$P$</span> is contained a known region, then one possible metric of density is to measure how much area the points in <span class="math-container">$P$</span> cover compared to the total region, which can be computed as the ratio of the area of the convex hull to the area of the region. </p> <p>Of course, this has the disadvantage of creating immense bias in cases where there are outliers in <span class="math-container">$P$</span>. What I mean by that is if most points are dense in <span class="math-container">$P$</span> and then there is a single point far away from the dense region, the density will be underestimated (reflecting that <span class="math-container">$P$</span> is less dense than it actually is). This is the case because, <em>by definition</em>, the convex hull is the smallest convex polygon which contains <em>all</em> points. Whether this is a problem however, really just depends on the values of <span class="math-container">$P$</span>. If you remove outliers from <span class="math-container">$P$</span> before computing the density, this really becomes a non-issue. Though, it can be hard to quantify outliers.</p>
https://math.stackexchange.com/questions/3510381/measuring-point-density-in-mathbbr2
Question: <p>How it s possible to calculate standard error for single sample, While standard error is defined as variance in different sample means?</p> Answer: <p>The population has a (presumably unknown) variance. If you take a sample of size <span class="math-container">$n$</span> with replacement then the variance of the sample mean is <span class="math-container">$\frac1n$</span> times the population variance. Taking the square root gives the standard deviation.</p> <p>You can calculate the mean of the sample as an estimate of the population mean, though it is unlikely to be exactly correct. You can also estimate the population variance from the sample, at least if not all the samples give the same value, so taking the square root of <span class="math-container">$\frac1n$</span> times this variance estimate gives an estimate of the standard error of the mean. </p>
https://math.stackexchange.com/questions/3552581/standard-error-and-standard-deviations
Question: <p>If <span class="math-container">$X_1,X_2,…,X_n\sim Pois(λ)$</span>, find the UMVUE of <span class="math-container">$\exp(−2λ)$</span>. I know based on lehmann scheffe theorem, the step is</p> <p>(1)find <span class="math-container">$q(x)$</span> an unbiased estimater of <span class="math-container">$\exp(−2λ)$</span></p> <p>(2) <span class="math-container">$T(X)$</span> is sufficient and complete</p> <p>(3) <span class="math-container">$s(*)=\mathbb E(q(x)|t(x))$</span> is a UMVUE</p> <p>(4) var<span class="math-container">$(s(*))$</span> &lt;<span class="math-container">$\infty$</span>, then it is the UMVUE</p> <p>The answer IS: y=(-1)^x, when x is even y=1,when x is odd, y=-1.</p> <p>But I still do not know step by step, how to make it work?</p> Answer: <p>An easier approach is to take the approach in the two linked questions, using an initial unbiased estimator of <span class="math-container">$\exp(−2\lambda)$</span> to be <span class="math-container">$1$</span> if <span class="math-container">$X_1+X_2=0$</span> and to be <span class="math-container">$0$</span> if <span class="math-container">$X_1+X_2 \gt 0$</span>.</p> <p>Here is a sketch of an approach using an initial unbiased estimator of <span class="math-container">$\exp(−2\lambda)$</span> to be <span class="math-container">$+1$</span> if <span class="math-container">$X_1$</span> is even and to be <span class="math-container">$-1$</span> if <span class="math-container">$X_1$</span> is odd, which following your notation we might call <span class="math-container">$q(X_1)$</span>:</p> <p>1) <span class="math-container">$q(X_1)$</span> is an unbiased estimator as its conditional expectation, given <span class="math-container">$\exp(−2\lambda)$</span> and so <span class="math-container">$\lambda$</span>, is <span class="math-container">$+1\left(e^{-\lambda}+e^{-\lambda}\frac{\lambda^2}{2!}+\cdots\right) -1\left(e^{-\lambda}\frac{\lambda^1}{1!}+e^{-\lambda}\frac{\lambda^3}{3!}+\cdots\right) = e^{-\lambda}\left(1-\frac{\lambda^1}{1!}+\frac{\lambda^2}{2!}-\frac{\lambda^3}{3!}+\cdots\right)=e^{-2\lambda} $</span></p> <p>2) A complete sufficient statistic for a Poisson distribution is <span class="math-container">$T(\mathbf X)=\sum\limits_1^n X_i$</span></p> <p>3) The conditional distribution of <span class="math-container">$X_1$</span>, given <span class="math-container">$\sum\limits_1^n X_i=t$</span>, is binomial with parameters <span class="math-container">$t$</span> and <span class="math-container">$\frac{1}{n}$</span>, so you can show the conditional probability that <span class="math-container">$X_1$</span> is even is <span class="math-container">$\frac{1+\left(1-\frac2n\right)^t}{2}$</span> and that <span class="math-container">$X_1$</span> is odd is <span class="math-container">$\frac{1-\left(1-\frac2n\right)^t}{2}$</span>, and thus <span class="math-container">$\mathbb E[q(X_1) \mid T(\mathbf X)=t] = \left(1-\frac2n\right)^t$</span> and this is then the uniformly minimum-variance unbiased estimator for <span class="math-container">$\exp(−2\lambda)$</span> using the <a href="https://en.wikipedia.org/wiki/Lehmann%E2%80%93Scheff%C3%A9_theorem" rel="nofollow noreferrer">Lehmann–Scheffé theorem</a></p> <p>4) This UMVUE estimator is bounded: when <span class="math-container">$n=1$</span> it is <span class="math-container">$-1$</span> or <span class="math-container">$+1$</span>, while for <span class="math-container">$n \ge 2$</span> it is bounded by <span class="math-container">$0$</span> and <span class="math-container">$1$</span>. So it has a finite variance. </p>
https://math.stackexchange.com/questions/3564547/what-is-the-umvue-of-exp-2-lambda-for-x-is-a-random-variable-with-poisson-d
Question: <p>The batteries produced in a factory are tested before packing: 1.5% of batteries are found to be faulty, and are scrapped. Whether or not a battery is faulty is independent of each other. Experience suggested that a ‘good’ battery could last for 36 to 45 hours when used, and that all times within this range are equally likely.</p> <p>D: The total time that a box of 100 good batteries lasts when used.</p> <p>(c) State the distribution, including the values of any parameters, that may be used to approximate the distribution of D, the total time that a box of 100 good batteries lasts. Also, Justify the use of this distribution briefly. </p> <p>(d) Use the distribution that you have suggested in part c to calculate an approximate value for the probability that a box of 100 good batteries will last for less than 4000 hours. </p> <p>i can't find out the mean and standard derivation of it, moreover, can i use normal distribution to approximate the probability, can someone help me?</p> Answer: <p><strong>Background.</strong> I suppose the <span class="math-container">$n = 100$</span> batteries are used sequentially, so that the total time the box lasts is <span class="math-container">$T = X_1 + X_2 + \cdots + X_{100},$</span> where <span class="math-container">$X_i \sim \mathsf{Unif}(35.45).$</span> </p> <p>By the Central Limit Theorem, the sum of such a large number of independent uniformly distributed random variables is very nearly normally distributed. (In fact, only <span class="math-container">$n=10$</span> would be large enough to get a nearly normal total. You may want to look at <a href="https://en.wikipedia.org/wiki/Irwin%E2%80%93Hall_distribution" rel="nofollow noreferrer">Wikipedia on the 'Irwin-Hall Dist'n'</a>.)</p> <p>In order to work the problem, you need to find <span class="math-container">$E(X_i) = 40.5.$</span> and also <span class="math-container">$Var(X_i).$</span> Then use these results to find <span class="math-container">$E(T)$</span> and <span class="math-container">$Var(T).$</span> Then the final answers use a normal distribution, with that mean and variance.</p> <p>With that start, I will leave the details to you. This seems to be a homework problem. Soon, there may be a similar problem on an exam, and I want you to know how to do that. I will simulate the answers, using R statistical software, so you will have something to check against when you've finished working this problem. </p> <p><em>Notes:</em> (1) A simulation based on a million boxes will give pretty good approximate answers. (2) If you are using printed tables of the standard normal CDF, that may involve some rounding, so your probability answer may differ slightly from mine.</p> <p><strong>Simulation.</strong> Total times for <span class="math-container">$m = 10^6$</span> boxes, each with <span class="math-container">$n = 100$</span> batteries are simulated using R statistical software. </p> <pre><code>set.seed(2020) t = replicate(10^6, sum(runif(100,36,45))) mean(t); sd(t) [1] 4050.054 # aprx E(T) = 4050 [1] 25.98528 # aprx SD(T) = 25.98 mean(t &lt; 4000) [1] 0.026872 # aprx P(T &lt; 4000) = 0.027 pnorm(4000, 4050, 25.98) [1] 0.02714238 # P(T &lt; 4000) </code></pre> <p>Here is a histogram of the lifetimes <span class="math-container">$T$</span> of a million boxes along with the density curve of the approximate normal distribution of <span class="math-container">$T.$</span> The area under the curve to the left of the vertical broken line represents <span class="math-container">$P(T &lt; 4000).$</span></p> <pre><code>hist(t, prob=T, col="skyblue2", main="Simulated Dist'n of Box Lifetime") curve(dnorm(x, 4050, 25.98), add=T, lwd=2) abline(v = 4000, col="red", lwd=2, lty="dotted") </code></pre> <p><a href="https://i.sstatic.net/bw3r4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bw3r4.png" alt="enter image description here"></a></p>
https://math.stackexchange.com/questions/3609189/mean-and-standard-derivation-about-battery
Question: <p>Two numbers are choosen at random from the sequence of number 1,2,3,.........n. what is the probability that one of them is less than k and other is greater than k?</p> Answer: <p>If <span class="math-container">$k=1$</span> and <span class="math-container">$k=n$</span>, the probability is <span class="math-container">$0$</span>.</p> <p>Let us assume that <span class="math-container">$1&lt;k&lt;n$</span>.</p> <p>First of all, the total number of choices is <span class="math-container">$B=\binom{n}{2}=\dfrac{n(n-1)}{2}$</span> and we are in an equiprobability context, each elementary event has probability </p> <p><span class="math-container">$$p=\dfrac{1}{B}=\dfrac{2}{n(n-1)}$$</span></p> <p>Besides, there are <span class="math-container">$(k-1)(n-k)$</span> ways to "build" a favorable case.</p> <p>Explanation : There are <span class="math-container">$k-1$</span> (resp <span class="math-container">$n-k$</span>) ways to select a number to the left (resp. right) of <span class="math-container">$k$</span>. </p> <p>Therefore, the result is :</p> <p><span class="math-container">$$P_k=(k-1)(n-k)p=\dfrac{2(k-1)(n-k)}{n(n-1)}$$</span> </p> <p>Here is the graphical representation, in the case <span class="math-container">$n=20$</span>, of the values of <span class="math-container">$P_k$</span>.</p> <p>Please note that <span class="math-container">$P_k$</span> is maximal and <span class="math-container">$\approx 1/2$</span> when <span class="math-container">$k$</span> is "halfway" (here : <span class="math-container">$k=10$</span> or <span class="math-container">$11$</span>):</p> <p><a href="https://i.sstatic.net/MvnZs.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/MvnZs.jpg" alt="enter image description here"></a></p>
https://math.stackexchange.com/questions/3624952/k-being-given-probability-that-when-selecting-two-numbers-a-b-in-1-2-cd
Question: <p><strong>Disclaimer</strong>: This problem is for my own understanding and not for a class in any way. </p> <p>Greetings!</p> <p>I am trying to solve the following problem but I am unsure how to proceed beyond what I have below. The trouble I am having is that $Z$ and $W$ and not independent of one another and so I am not sure how to address this dependency. </p> <p>I have solved for $Z$ using the standard approaches for hierarchical distributions and so I should be good up to that point.</p> <p>Any ideas on how to proceed?</p> <p>Let $w &lt; v$. We wish to solve</p> <p>\begin{align} W \overset{iid}{\sim} U(0,w)\\ Z \sim U(W,v) \end{align}</p> <p>solving for $Z$, we obtain</p> <p>\begin{equation} Z \sim - \ln z I_{(0,z)}(z) \end{equation}</p> <p>and so </p> <p>\begin{equation} \frac{Z}{W} \sim ??? \end{equation}</p> Answer: <p><strong>Comment:</strong> To me, this is still not clearly stated. (In particular, I don't follow your last two displayed formulas.) Here is a speculative interpretation of a special case. First, you select $W \sim \mathsf{Unif}(0, 5).$ Then you select $Z \sim \mathsf{Unif}(W, 10).$ So $Z$ has support $(0,10),$ but is hardly independent of $W$. Thus, the distribution of $Z$ is a 'mixture' of uniforms with random left boundaries determined by $W.$ </p> <p>[A simplification would be to let $Z$ be a 50:50 mixture of $\mathsf{Unif}(2,10)$ and $\mathsf{Unif}(4,10)$.]</p> <p>A quick simulation (in R) of what I describe is shown below. If this is the right interpretation, seeing a histogram of a million simulated $Z$'s might help you solve the problem. (The 'ramp' at the left is not linear.) If not, maybe you can try once more to explain what you want.</p> <pre><code>set.seed(429); m = 10^6; a = 5; b = 10; z = numeric(m) for(i in 1:m) { w = runif(1, 0, a); z[i] = runif(1, w, b) } summary(z); sd(z) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.006075 4.558774 6.387860 6.245682 8.191052 10.000000 [1] 2.320161 hist(z, prob=T, col="skyblue2") abline(v=c(a,b), col="red", lwd=3, lty="dashed") </code></pre> <p><a href="https://i.sstatic.net/QsG3B.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/QsG3B.png" alt="enter image description here"></a></p> <p>A scatterplot of the first 20,000 $(W,Z)$ pairs (captured by a sligtly different program) is shown below. Notice the higher density toward the right.</p> <p><a href="https://i.sstatic.net/y5gkB.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/y5gkB.png" alt="enter image description here"></a></p>
https://math.stackexchange.com/questions/2758870/ratio-of-certain-dependent-random-variables
Question: <p>We have the following structure:</p> <p>$\begin{bmatrix} A &amp; B &amp; C &amp; D\\ A &amp; C &amp; B &amp; D\\ B &amp; A &amp; C &amp; C\\ A &amp; A &amp; B &amp; C \end{bmatrix}$</p> <p>It is required to tell which design is this CRD,LSD,RBD or factorial design?</p> <p>I know it can't be LSD as it has same treatments in some row and column. But I am confused between CRD AND RBD.</p> Answer:
https://math.stackexchange.com/questions/2793969/identification-of-the-experimental-design
Question: <p>Scenario: A company that makes cartons finds the probability of producing a carton with a puncture is 0.05. The probability that a carton has a smashed corner is 0.08. The probability that a carton has a puncture and a smashed corner is 0.004. </p> <p>Question: If a quality inspector randomly selects a carton, find the probability that the carton has a puncture or has a smashed corner.</p> Answer: <p>Let $P$ and $S$ respectively be the events "the carton has a puncture" and "the carton has a smashed corner":</p> <p>$$P(P \cup S) = P(P) + P(S) - P(P \cap S)$$</p> <p>Thus, what you are looking for is 0.126</p> <p>The property invoked is true for all <a href="https://en.wikipedia.org/wiki/Probability#Not_mutually_exclusive_events" rel="nofollow noreferrer">non mutually exclusive events</a>.</p>
https://math.stackexchange.com/questions/2750166/probability-using-statistics
Question: <p>Standard deviation is used as a measure of deviation or distribution in a sample or a population.Similarly mean is used as a measure of something in a group(say average marks of a group of students).How is standard deviation different from average deviation?</p> Answer: <p>Let $(x_i)$ be a data set. Denote by the average deviation $D$. Then</p> <p>$$ D = \frac{1}{n} \sum_{i=1}^n (x_i - \mu) $$</p> <p>and</p> <p>$$ \sigma = \sqrt{ \frac{1}{n} \sum_{i = 1}^n (x_i - \mu) ^2 } $$</p> <p>Certainly two different quantities. Variance (the square of standard deviation) measure the average <strong>squared</strong> deviation - i.e., the average positive distance to the mean.</p>
https://math.stackexchange.com/questions/2795144/how-is-standard-deviation-different-from-average-deviation
Question: <p>It is known that probability density function (pdf) is not unique, but can we say the same about pmf?</p> <p>Also, what can be the possible example where pdf or pmf may not exist?</p> Answer: <p>If you want a simple example where it may not exist, consider the discrete uniform on -inf to inf. That is each event on the Reals is equally likely. </p>
https://math.stackexchange.com/questions/2795856/is-probability-mass-function-pmf-unique
Question: <p>An urn contains 3 red balls and 2 blue balls. A ball is drawn. If the ball is red, it is kept out of the urn and a second ball is drawn from the urn. If the ball is blue, then it is put back in the urn and a red ball is added to the urn. Then a second ball is drawn from the urn. (a) What is the probability that both balls drawn are red? (b) If the second drawn ball is red, what is the probability that the first drawn ball was blue? Please any one who can answer.</p> Answer: <p>a. $3/5\cdot 2/4 = 3/10$</p> <p>b. The probability of RR is $3/5\cdot 2/4 = 3/10$</p> <p>The probability of BR is $2/5\cdot 4/6 = 4/15$</p> <p>The probability of the first being B given the second is R is.....</p> <p>$$P(A|B) = \frac{P(B|A)\cdot P(A)}{P(B)} = \frac{4/6\cdot 2/5}{(4/6\cdot 2/5) + (2/4\cdot 3/5)} = 8/17$$</p>
https://math.stackexchange.com/questions/2776897/statistic-problem
Question: <p>I have a question which I'm not sure how to phrase hence i couldn't find similar questions:</p> <p>Usually all the examples i find online refer to dependent events and their probability of happening based on the event they depend on.</p> <p>But in my question the issue is finding the probability of that event they depend on if i know that the dependent events happened and i know their own probability.</p> <p><strong>Example:</strong></p> <ul> <li><p>The chance if it raining today is 12%<br/><br/></p></li> <li><p>when it rains, there is a 60% chance of sheep roaming the fields</p></li> <li><p>on a not rainy day this probability is 70%<br/><br/></p></li> <li><p>when it rains, there is 14% chance of new flowers blooming</p></li> <li><p>on a not rainy day this probability is 24%<br/><br/></p></li> <li><p>when it rains, there is a 1% chance of an alien invasion</p></li> <li>on a not rainy day this probability is 11%</li> </ul> <p>Now if i know that today sheep roamed the fields, new flowers bloomed, and aliens invaded, what is the chance that it rained today? is it still 12% or does the probability chance because of the dependent events?</p> Answer: <p>To elaborate on the comments:</p> <p>First of all, to proceed we need to assume something about how the events depend on each other. It can't be the case that they are strictly independent of each other. For example: seeing the aliens is strong evidence for the absence of rain, and as the absence of rain also increases the probability of the other two events, seeing aliens increases our estimate for their probability as well. Best we can do (and it suffices here) is to assume that the three events are independent conditioned on the presence or absence or rain. That is, if we are told that it is raining then seeing aliens tells us nothing further about the sheep or flowers. Same if we are told it is not raining. Granted, this is a somewhat technical point but these things matter. </p> <p>Under that assumption:</p> <p>Let $\{\phi_A,\phi_B,\phi_C\}$ be the the probabilities of the three events when it is raining. Let $\{\psi_A,\psi_B,\psi_C\}$ be their probabilities when it is not. Let $P$ be the probability that it is raining. Then, by Bayes' Theorem, the probability that it is raining given that we observe all three events is $$\frac {P\times \phi_A\times \phi_B\times \phi_C}{P\times \phi_A\times \phi_B\times \phi_C+(1-P)\times \psi_A\times \psi_B\times \psi_C}$$</p> <p>In your specific example that comes to $$\frac {.12\times .6\times .14\times .01}{.12\times .6\times .14\times .01+.88\times .7\times .24\times .11}=0.006160164$$</p> <p>So we can be reasonably sure that it is not raining (small comfort, what with the aliens and all).</p>
https://math.stackexchange.com/questions/2805564/probability-of-event-occurring-based-on-dependent-events
Question: <p>I'm confused by the statement of the central limit theorem we've been given:</p> <p>'If you take the sum $X$ of $N$ independent variables $x_i$, each taken from a distribution with mean $\mu_i$, then the distribution for $X$ has the average $\Sigma\mu_i$.'</p> <p>So does this mean that if I take one number $x_i$ from a distribution and repeat the process $N$ times, then sum them I'll get a distribution that has mean $\Sigma\mu_i$? Where $\mu_i$ are the means of the distributions each $x_i$ has come from? </p> <p>Or is it saying that if I take a sample $x_i$ each containing multiple numbers and calculate the mean of each sample to be $\mu_i$, then the distribution formed by the sample means has mean $\Sigma\mu_i$? Or something completely different? </p> <p>I think what particularly confuses me is the idea that the mean of the new distribution $X$ should be a sum of means, because then won't your mean get bigger the more distributions you gather the $x_i$ from? But if all the distributions have a mean of 0.5 say, why should the distribution $X$ have a mean of $0.5N$? Our lecturer did show us that $$&lt;X&gt;=&lt;\Sigma x_i&gt;=\Sigma&lt;x_i&gt;=\Sigma\mu_i$$ But I can't get my head around the result. </p> Answer:
https://math.stackexchange.com/questions/2762246/central-limit-theorem-independent-distributions
Question: <p>For a project, I have to randomly choose exoplanets out of a database, but since the database has different sections, I have to choose one section. If one section has more exoplanets than another and I am randomly choosing five exoplanets, will the five exoplanets be more diverse if I choose the bigger or smaller section? </p> Answer:
https://math.stackexchange.com/questions/2797391/methodology-of-choosing-random-data
Question: <p>What sample size is needed at the 95% confidence level, where the error (E) is 3 and the standard deviation is 20?</p> <p>I can't figure out this question for the life of me and I am not sure of what formula to use. I know the answer is 171 but I would like to understand how we got there.</p> Answer: <p>$n = (\frac{Z\cdot \sigma}{E})^2$</p> <p>From the formula you can see that to reduce the error, a larger sample size is required making for a more reliable test.</p>
https://math.stackexchange.com/questions/2825564/what-sample-size-is-needed-at-the-95-confidence-level-where-the-error-e-is-3
Question: <p>Suppose X ∼ Poisson(λ), instead of estimating λ, we are interesting in estimating P(X = 0)^2 = e^−2λ. Show that δ(X) = (−1)X is an unbiased estimator for e^−2λ . Is this a good estimator? Why?</p> <p>I'm having a bit of trouble starting this problem. I know that equation for Bias and all, but how do I use it to calculate this answer. Thank you. </p> Answer: <p>We have $\Pr(X=k)=e^{-\lambda}\frac{\lambda^k}{k!}$. It follows that $$E((-1)^X)=\sum_{k=0}^\infty (-1)^k e^{-\lambda}\frac{\lambda^k}{k!}.$$ Bring an $e^{-\lambda}$ out. We get $$E((-1)^X)=e^{-\lambda}\sum_{k=0}^\infty (-1)^k\frac{\lambda^k}{k!}.$$ We recognize the sum after the $e^{-\lambda}$ as the usual power series for $e^{-\lambda}$. It follows that the expectation of $(-1)^X$ is $e^{-2\lambda}$, and therefore $(-1)^X$ is an unbiased estimator of $e^{-2\lambda}$.</p> <p>As to whether it is a good estimator, using an estimator that often produces $-1$ as an estimate of a clearly positive quantity sounds quite unreasonable! It is "on average" right, but has such high variance that it is essentially useless.</p>
https://math.stackexchange.com/questions/1502767/unbiased-estimators-poisson
Question: <p>Ok so this the question:</p> <p>An administrator at a medium-sized hospital tells the board of directors that, among patients received at the Emergency room and eventually admitted to a ward, the average length of time between arriving at Emergency and being admitted to the ward is 4 hours and 15 minutes. One of the board members believes this figure is an underestimate and checks the records for a sample of 25 patients. The sample mean is 6 hours and 30 minutes. Assuming that the population standard deviation is 3 hours, and that the length of time spent in Emergency is normally distributed, use the sample data to determine whether there is sufficient evidence at the 5% level of significance to assert that the administrator's claim is an underestimate.</p> <p>The first scenario is that that for the null hypothesis the mean is equals to 4hrs 15mins. For the alternative hypothesis the mean is not equals to 4hrs 15mins. So it could be less or more.</p> <p>However the question says that one the board memeber thinks that it might be an UNDERESTIMATE so that means the alternative hypothesis must be higher than 4hrs 15 mins? Right? So that opens the possibility to a another scenario which is:</p> <p>In the null hypothesis the mean is equals to or less than 4hrs 15mins. And in the alternative hypothesis the mean is greater than 4hrs 15mins.</p> <p>So the first scenario is a two tailed test and the second scenario is one tailed test. The question asks me whether it is a one tailed test or two tailed, and there is only one correct answer. But I am not sure which one is correct. From my perspective both make sense. If someone could give me the correct answer and explain it to me it would help me out a lot.</p> Answer: <p>There is only one scenario. The administrator's statement has to be taken at face value and is the null hypothesis.</p> <p>$H_0: t=4.25$ hours</p> <p>The board member has an alternative hypothesis.</p> <p>$H_1: t&gt;4.25$ hours</p> <p>This is one-tailed.</p>
https://math.stackexchange.com/questions/1272083/one-tailed-or-two-tailed
Question: <p>Let's suppose we have two different processes, each generating some amount of money $M$ every second.</p> <p>$$0 \leq M \leq 1000$$</p> <p>We run each process for $50\%$ of available time.</p> <p>The question is how to compare the productivity (in money; per second) of these two processes if there is no information about "random noise" in every process? The only information about each process we have is a log-file: what $M$ was generated at every second.</p> Answer: <p>You have two samples - one from each method - with equal sample sizes (and big enough I assume) and you want to see which method generates <em>statistically</em> better results. This is a standard methodology with a confidence interval for the <em>difference of means</em> or a hypothesis testing again for the <em>difference of means</em>. Of course the result will at some significant level. </p> <p>The mean and the variances will be calculated from the sample, so do not worry about this "noice". The sample variance will take care of it.</p>
https://math.stackexchange.com/questions/1589763/compare-2-algorithms-by-statistics
Question: <p>I have a simple algebra formula, proven to work. But I need help in understanding why it works.</p> <p>The Scenario: I work at a call center, and am trying to calculate the time free in-between calls. I have the 3 variables, provided by Live data:</p> <ul> <li>Staff Available (not on calls)</li> <li>Staff Busy (on calls)</li> <li>Average call length of 5 minutes</li> </ul> <p>So once I end a call, I go to the back of the line of available staff before I get the next call.</p> <p>This is the formula, tested to work:</p> <p>: (Staff Available / Staff Busy) * 5 minutes call length = Time in-between calls</p> <p>Example: 100 staff. 80 busy, 20 available. [20/80 * 5 = 1.25 minutes]</p> <p>Example: 100 staff. 50 busy, 50 available. [50/50 * 5 = 5 minutes] (Which is expected, as we are double staffed.)</p> <p>Example: 100 staff. 20 busy, 80 available. [80/20 * 5 = 20 minutes]</p> <hr> <p>Question - Why does this equation work? I must be taking shortcuts. Why do we divide Available/Busy instead of Available/Total? </p> <p>I'd greatly appreciate any explanation. Thank you very much. -Brennan</p> Answer: <p>Let's suppose any particular staff's workload can be represented by the busy staff and the available staff. Then, the staff spends $\frac{\text{Busy}}{\text{Total}}$ of the time taking calls and $\frac{\text{Available}}{\text{Total}}$ free. Since the calls are on average $5$ minutes long, if he take $5$ minutes taking calls, it follows that the amount of time free he has on average is $t$, where:</p> <p>$$\frac{5}{\frac{\text{Busy}}{\text{Total}}}=\frac{t}{\frac{\text{Available}}{\text{Total}}}$$</p> <p>Simplifying, we get the formula you stated:</p> <p>$$t=\frac{\text{Available}}{\text{Busy}}\times5$$</p>
https://math.stackexchange.com/questions/1521759/please-explain-a-simple-formula-calculating-time-in-between-a-call-queue
Question: <p>Let $X, Y$ have the joint pdf $f(x, y)= 2, \quad 0 &lt; y &lt; x &lt; 1$</p> <p>I'm trying to calculate the marginal probability density functions, but I don't know which intervals I'm supposed to use. The source I'm learning from will interchange the following</p> <p>$f_X(x) = \int_0^x$</p> <p>$f_Y(y) = \int_y^1$</p> <p>vs.</p> <p>$f_X(x) = \int_x^1$</p> <p>$f_Y(y) = \int_0^y$</p> <p>I know they're just variables, but if the question asks me for $f_{(X|Y)}(x | Y = y)$, then I'm going to have different answers am I not?</p> <p>Also, would it make a difference if it was $0 \leq y \leq x \leq 1$?</p> Answer: <p>In general, to get the marginal $f_X(x)$ you integrate $\int f(x,y)\mathop{dy}$ over all of $\mathbb{R}$. However, you have to consider the region where your joint density is nonzero.</p> <p>For your particular joint density, $f(x,y)$ is zero when $y\ge x$ or $y \le 0$, so this would reduce to only integrating over $y \in (0,x)$, i.e. $\int_0^x$. [Alternatively, you can think of this as integrating only over the region where your joint density is defined/nonzero.] Similarly, $f_Y(y) = \int_y^1 f(x,y) \mathop{dx}$.</p> <p>I suspect the second pair of integrals in your textbook is for a different density defined on a different region: $0 &lt; x &lt; y &lt; 1$.</p> <p>And no, there is no difference between $\le$ and $&lt;$ if you have a density. This may change when your cdf is not continuous, but I don't think you need to worry about this yet.</p>
https://math.stackexchange.com/questions/1571251/joint-probability-distributions-with-continuous-random-variables
Question: <p>Hello I found a problem on statistics which make me a bit confused. Could anyone help? Thanks!</p> <p>Let <em>X1</em>, <em>X2</em>, <em>X3</em> be independent random variables following exponential distribution with parameter <em>θ</em>=$5$. What is the probability that the minimum of <em>X1</em>, <em>X2</em> and <em>X3</em> is larger than $1$?</p> Answer: <p>Well, one way is, if $M$ is the minimum of the three, then \begin{align*} P(M&gt;1) &amp;= P(X_1&gt;1,X_2&gt;1,X_3&gt;1)\\ &amp;= P(X_1&gt;1)P(X_2&gt;1)P(X_3&gt;1)\tag{1}\\ &amp;= e^{-5}e^{-5}e^{-5}\\ &amp;=3.059023e-07, \end{align*} where (1) is true because of independence.</p>
https://math.stackexchange.com/questions/1559403/what-is-the-probability-that-the-minimum-of-x1-x2-and-x3-is-larger-than-1
Question: <p>Suppose $X$ is a binomial random variable with parameters $(100, 1/3)$ and $Y$ is a geometric random variable with parameter 1/4.</p> <p>(a) Find $E[(50 + X)^2]$.</p> <p>(b) Find $Var(10 − 2Y )$.</p> <p>a) I know that for a binomial random variable $E(X)=np$ and in this case $(n,p)=(100,1/3)$ so $E(X)=100/3$ from here though, I am unsure how to manipulate this to achieve the operations that are asked in the question ie. How do i go from $E(X)=100/3$ and use this to get $E[(50 + X)^2]$?</p> <p>b) For a geometric random variable I know that $E(Y)=1/p$ and in this case $p=1/4$. From here i know i need to use this to calculate the variance ie. $E[Y^2]-E[Y]^2$ but again, I dont know how to perform the operations asked in the part b) ie. if I have $var(Y)$ how do i transform this into $Var(10 − 2Y )$.</p> <p>Any help would be appreciated. </p> Answer: <p>a) You may already know that the variance of $X$ is $np(1-p)$, that is, $(100)(1/3)(2/3)$. </p> <p>To find the expectation of $(50+X)^2$, expand the square, and use the linearity of expectation. We get $E(2500)+100E(X)+E(X^2)$.</p> <p>To find $E(X^2)$, use the fact that $\text{Var}(X)=E(X^2)-(E(X))^2$.</p> <p>b) You may already know the variance of a geometric. If you don't, you can derive it or look it up, please see Wikipedia, <em>geometric distribution</em>.<br> In the notation of the OP, it is $\frac{1-p}{p^2}$. </p> <p>To finish, use the fact that in general the variance of the random variable $a+bY$ is $b^2$ times the variance of $Y$.</p>
https://math.stackexchange.com/questions/1560322/binomial-and-geometric-variables-finding-expected-values-and-variance
Question: <p>$n=240$ trials with a $6$ sided dice</p> <p>$X = \#5$'s</p> <p>$Y = \#6$'s</p> <p>How do I go about showing that $\operatorname{Cov}(X,Y) = -20/3$? I think I need to find $V(X+Y)$ but I'm not sure how. $V(X)=V(Y)=240* 1/6 * 5/6$. </p> Answer: <p>That is the covariance if the die rolled 240 times is fair (or the 240 dice rolled are fair). What if the die/dice is/are not fair?</p> <p>X and Y are <a href="https://en.wikipedia.org/wiki/Binomial_distribution#Probability_mass_function" rel="nofollow">binomially distributed</a>:</p> <p>$$P(X=x) = \binom{n}{x}(p_x)^x(1-p_x)^{n-x}$$</p> <p>$$P(Y=y) = \binom{n}{y}(p_y)^y(1-p_y)^{n-y}$$</p> <p>$p_x$ and $p_y$ represent the probability of rolling a 5 and a 6, resp.</p> <p>$$E[X] = np_x = 240p_x \stackrel{if \ fair}{=} 40$$</p> <p>$$E[Y] = np_y = 240p_y \stackrel{if \ fair}{=} 40$$</p> <p>Now to compute $Cov(X,Y) = E[XY] - E[X]E[Y]$ we also need $E[XY]$.</p> <p>$$E[XY] = \sum_{x=0}^{n}\sum_{y=0}^{n} xy P(X=x, Y=y)$$</p> <p>I guess $X$ and $Y$ are not independent.</p> <p>$$P(X=x, Y=y)$$</p> <p>is what you call the <a href="http://dspace.uni.lodz.pl:8080/xmlui/bitstream/handle/11089/694/147-157.pdf" rel="nofollow">bivariate binomial distribution</a>:</p> <p>$$P(X=x, Y=y) = \binom{n}{x}\binom{n-x}{y}(p_x)^x(p_y)^y(1-p_x-p_y)^{n-x-y}$$</p> <p>Note that</p> <p>$$\binom{n}{x}\binom{n-x}{y} = \frac{n}{(n-x-y)!x!y!}$$</p> <p>agreeing with the form in the link above, which derives $E[XY]$ to be:</p> <p>$$E[XY] = n(n-1)p_xp_y \stackrel{if \ fair}{=} (240)(239)(1/6)(1/6)$$</p> <p>$$\therefore, Cov(X,Y) = E[XY] - E[X]E[Y] \stackrel{if \ fair}{=} -240(1/6)(1/6)$$</p>
https://math.stackexchange.com/questions/1562631/how-can-i-find-operatornamecovx-y
Question: <p>Let $\mu,\alpha_n:\mathbb R^+\to \mathbb R$ continuous function with $\mu$ bounded function. Let $N^{(n)}$ the trajectory of a Poisson process with intensity $(\alpha_n \mu)(t)$. Let $0=T_0^{(n)}&lt;T_1^{(n)}&lt;..$ jumps of $N^{(n)}$.</p> <p>Let $M_n(t)=\sum_{i=1}^{N_t^{(n)}} \frac {1} {\alpha_n (T_i^{(n)})}$</p> <p>Show $M_n(t)$ is an unbiased estimator of $M(t)=\int_0^t \mu (s) ds$.</p> <p>My idea: I calculate $E(M_n(t)|N^n=u)$ and I find: $E(M_n(t)|N^n=u)=u \frac {1} {\int_0^t (\alpha_n \mu)(s)ds} M(t)$</p> <p>$E(E(M_n(t)|N^n=u))=E(M_n(t))$. But $E(M_n(t))-M(t)=u \frac {1} {\int_0^t (\alpha_n \mu)(s)ds} M(t)-M(t)$ is not equal to 0.</p> <p>Can you help me?</p> Answer: <p>You're close, it seems. The issue is that you've written $$ E[E[M_n(t) | N^n_t = u] ] = E[M_n(t)] $$ which is not true. What is true is that $$ E[E[M_n(t) | N^n_t] ] = E[M_n(t)] $$ With that in mind, you found that $$ E[M_n(t)|N^n_t = u] = \frac{u}{\int_0^t \alpha \mu (s) \, ds} M(t) $$ which implies that $$ E[M_n(t)|N^n_t] = \frac{N^n_t}{\int_0^t \alpha \mu (s) \, ds} M(t) $$ Therefore, $$ E[E[M_n(t) | N^n_t] ]= \frac{E[N^n_t]}{\int_0^t \alpha \mu (s) \, ds} M(t) = M(t). $$</p>
https://math.stackexchange.com/questions/1575235/unbiased-estimator-of-int-0t-mu-s-ds
Question: <p><em>(Sorry for the inconvenience related to the tags, please feel free to correct my post if it needs a better scope by adding some other tags).</em></p> <p><strong>CONTEXT</strong></p> <p>I have several (decimal) numbers shaped like this :</p> <ul> <li>1.081</li> <li>289.089167</li> <li>2.98</li> <li>...</li> </ul> <p><strong>PROBLEM</strong></p> <p>I would like to get a decimal number, that I call "precision", which would give me the precision, which means the number of digits of this (decimal) number.</p> <p><strong>EXPECTED RESULTS</strong></p> <ul> <li>1.081 => <strong>0.001</strong></li> <li>289.089167 => <strong>0.000001</strong></li> <li>2.98 => <strong>0.01</strong></li> <li>67.00...n => <strong>0.0...(n-1)..1</strong></li> </ul> <p><strong>ATEMPTS</strong></p> <p>I work in IT, and most precisely on an audio apps. So I have a audio file in input, and it gives me the audio duration.</p> <p>What I try to achieve is to set a range, which you can find in any other website shaped like following :</p> <pre><code>&lt;input type="range" value="0" min="0" max="???" /&gt; </code></pre> <p>And initated to 0. The user can drag the cursor to change the currentTime of the audio, and to be the most precise possible, I have to get the precision, in order to set the "max='???'" like following :</p> <pre><code>max="getPrecision(audio.duration)" </code></pre> <p>I simplifyed the code, in reality the max property will be changed via JavaScript but it is not the aim of my question.</p> <p><strong>QUESTION</strong></p> <p>Does a mathematical formula exists to get this expected output ?</p> Answer: <p>Given that your input number is "$\color\red{n}.\color\green{m}$", the formula is "$\color\red{n}.\color\green{m}$"/"$\color\red{n}\color\green{m}$".</p> <p>So in any scripting language, simply divide the rational number represented in the original string, by the integer number represented in the original string without the decimal point.</p>
https://math.stackexchange.com/questions/1598451/get-precision-of-any-decimal-number
Question: <p>If I know $\alpha=x_2-x_1$ and $\beta=(x_3-x_1)+(x_3-x_2)$, how can I calculate the variance of $\{x_1,x_2, x_3\}$?</p> Answer: <p>$x_3-x_2=(x_3-x_1)-(x_2-x_1)$ allows you to easily obtain $x_k-x_1$. The shift by $x_1$ doesn't change the variance.</p>
https://math.stackexchange.com/questions/1457954/how-can-i-calculate-the-variance-if-the-only-thing-i-know-is-the-difference-betw
Question: <p>Let X have a normal distribution with mean μ and variance $\sigma^2$. Find $E[X^3]$ (in terms of μ and $\sigma^2$).</p> <p>Im pretty sure that $μ= E[X]$ so to find $E[X^3]$ would i just split it up into $E[X*X^2]$ since i know $E[X]$ and $E[X^2]$ can be found from the variance formula?</p> Answer: <p><strong>Hint</strong>:</p> <p>If $U$ has <em>standard</em> normal distribution then $\mathbb EU^3=0$. </p> <p>This can be proved on base of symmetry (also $-U$ will have standard normal distribution so that $\mathbb EU^3=\mathbb E(-U)^3=-\mathbb EU^3$, and this implies $\mathbb EU^3=0$).</p> <p>Observe that: $$U:=\frac{X-\mu}{\sigma}$$ has standard normal distribution.</p> <p><strong>Edit</strong>:</p> <blockquote class="spoiler"> <p>$$\mathbb{E}X^{3}=\mathbb{E}\left(\sigma U+\mu\right)^{3}=\mathbb{E}\left(\sigma^{3}U^{3}+3\sigma^{2}\mu U^{2}+3\sigma\mu^{2}U+\mu^{3}\right)$$$$=\sigma^{3}\mathbb{E}U^{3}+3\sigma^{2}\mu\mathbb{E}U^{2}+3\sigma\mu^{2}\mathbb{E}U+\mu^{3}=\cdots$$</p> </blockquote>
https://math.stackexchange.com/questions/1564120/normal-distribution-finding-expectations
Question: <p>I am trying to do the following problem Suppose that $X_1,...,X_n\stackrel{iid}\sim N(0,1)$. Define $$\bar{X}_k=\frac{1}{k-1}\sum_{i=1}^{k-1}X_i,\,\,\,\,\,\,\text{for }k=2,3,.....,n $$</p> <p>(i) What is the joint distribution of $(X_2-\bar{X}_2,X_3-\bar{X}_3,...,X_n-\bar{X}_n)$?</p> <p>(ii) What is the distribution of $$\sum_{k=2}^n\frac{k-1}{k}(X_k-\bar{X}_k)^2$$ Now I am thinking to find the pdf of $X_2-\bar{X}_2,X_3-\bar{X}_3,...,X_n-\bar{X}_n$ separately and then multiply them since they are independent.</p> <p>To find the pdf of $X_2-\bar{X}_2$ I started by $$U=X_2-\bar{X}_2=X_2-X_1$$ $$V=X_2$$ after some calculation I got $$f_{UV}(u,v)=\frac{1}{2\pi}e^{-\frac{1}{2}u^2} e^{-v^2+uv} $$</p> <p>So to find the pdf of U we have to find $$f_U(u)=\int_{-\infty}^\infty\frac{1}{2\pi}e^{-\frac{1}{2}u^2} e^{-v^2+uv}\,\,dv$$</p> <p>After some calculation I got $$f_U(u)=\frac{1}{2\sqrt{\pi}}e^{-\frac{u^2}{4}}$$ I don't know whether I am in the right direction since it's involving a lot of calculation. I am wondering is there any other way that I can try. Any help would be highly appreciated.</p> Answer:
https://math.stackexchange.com/questions/1646896/finding-joint-distribution-for-the-following
Question: <p>This <a href="https://math.stackexchange.com/q/1576971/290307">https://math.stackexchange.com/q/1576971/290307</a> question reminded me of a yet unanswered question I had as a student.</p> <p><a href="https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test</a> allows me to decide if two samples in $\mathbb R$ have significantly different distributions.</p> <p>But for samples in $\mathbb R^n$ I have a choice of normal vectors against which I could order the sample sets. How would I compensate for that?</p> <p>EDIT:</p> <p>To clarify, my question is <em>not</em> about more than two samples but about the sample point being in $\mathbb R^n$ and thus lack a canonical ranking. By picking a hyperplane they get a ranking as the signed distance from that plane and I could do the MW-test.</p> <p>But as there are many hyperplanes I could pick and test against, there is an increasing chance that at least one of the choices gives a false positive.</p> Answer: <p>The problem of testing for the equality of $g$ group means is a well-discussed in nonparametric inference. Here are brief mentions of three methods in common use.</p> <p>Solution (1) would be to look into the theory behind the Kruskal-Wallis test, which deals with exactly this issue. (K-W for two groups is precisely M-W.) Perhaps start with the brutally brief account in Wikipedia on 'Kruskal-Wallis test', and then graduate to the references there. </p> <p>As with all rank-based tests, the K-W test is intended for data from continuous populations, and so becomes problematic if there are many ties in the data (within or among samples).</p> <p>(2) would be to do ${n \choose 2}$ M-W tests comparing two samples at a time, using level $\alpha/n$ for a 'family' error rate not exceeding $\alpha$ (according to Bonferroni's Inequality). Again here, ties can lead to difficulties.</p> <p>(3) Would be to do a permutation test, perhaps using the F-statistic of a one-way ANOVA as metric; a simulated permutation distribution would approximate the actual distribution of the F-statistic, which might not be an F-distribution.</p> <p>If you have a reasonably brief dataset with random samples from 3 or 4 populations, please edit it into your question and I will try to provide analyses using as many of these methods as are of interest to you. I do not think this is an appropriate forum for showing theoretical details exposited elsewhere. (Otherwise, I can provide an appropriate dataset for demonstration.) </p>
https://math.stackexchange.com/questions/1577278/mann-whitney-utest-in-n-dimensions
Question: <p>If $Y_1, Y_2, \ldots , Y_n$ denote a random sample from an exponential distribution with mean $θ$, then $E(Y_i)=θ$ and $V(Y_i)=θ^2$. Thus, $E(\bar Y)=θ$ and $V(\bar Y)=θ^2/n$, or $σ_Y=θ/\sqrt{n}$. Suggest an unbiased estimator for θ and provide an estimate for the standard error of your estimator.</p> <p>With these $Y_i$ and $\bar Y$, I don't know where to start with, should I do $E(\hat \theta)=\theta$? </p> Answer:
https://math.stackexchange.com/questions/1647133/suggest-an-unbiased-estimator-for-%ce%b8-and-provide-an-estimate-for-the-standard-err
Question: <p>I'm confused on how to find a function <span class="math-container">$g_{(1)}$</span> of the MLE that is a pivotal quantity. I've never seen such notation for a function before. Here is the problem statement:</p> <p>Let <span class="math-container">$Y_1$</span>,<span class="math-container">$Y_2$</span>,...,<span class="math-container">$Y_n$</span> be a random sample from a population with density function</p> <p><span class="math-container">$f(y|\theta)=\frac{2\theta^2}{y^3}$</span>, where <span class="math-container">$\theta &lt; y &lt; \infty$</span> (and 0 otherwise).</p> <p>We know that <span class="math-container">$Y_{(1)} = min(Y_1,Y_2,...,Y_n)$</span> is sufficient for <span class="math-container">$\theta$</span>, and that <span class="math-container">$\hat{\theta}$</span> = <span class="math-container">$Y_{(1)}$</span> is a MLE for <span class="math-container">$\theta$</span>. I am asked to Find a function <span class="math-container">$g_{(1)}$</span> of the MLE above that is a pivotal quantity, whereas it is represented as:</p> <p><span class="math-container">$g_{(1)} =$</span> blank, <span class="math-container">$y &gt; \theta$</span></p> <p>I am also asked to find a <span class="math-container">$100(1-\alpha)\%$</span> confidence interval for <span class="math-container">$\theta$</span>.</p> <p>I say that the pivotal quantity is <span class="math-container">$\frac{Y_{(1)}}{\theta}$</span>, however I'm not sure where to find the PDF of <span class="math-container">$\frac{Y_{(1)}}{\theta}$</span> in order to find <span class="math-container">$g_{(1)}$</span>.</p> Answer: <p>It is true that <span class="math-container">$T=\frac{Y_{(1)}}{\theta}$</span> is a pivotal quantity. We must show that the distribution of <span class="math-container">$T$</span> does not depend on <span class="math-container">$\theta$</span>. To that end note that <span class="math-container">$$ P(Y_{(1)}&gt;y) = P(Y_{1}&gt;y)^n=\left(1-\frac{\theta^2}{y^2}\right)^n. $$</span> where we have used the fact that the <span class="math-container">$Y_i$</span> are i.i.d. Hence <span class="math-container">$$ P(T&gt;y) = P(Y_{(1)}&gt;\theta y)^n=\left(1-\frac{1}{y^2}\right)^n $$</span> as desired.</p>
https://math.stackexchange.com/questions/4989767/finding-a-function-that-is-a-pivotal-quantity-of-the-mle
Question: <p>I just have a simple question on scaling a uniform distribution. I know that uniform distribution has probability density of $1/(b-a)$ defined on the interval a to b. </p> <p>My textbook says that we can scale the distribution to be between (0,1) and have a constant density of 1 by doing the following: </p> <p>Suppose X is a random variable. Then $U=(X-a)/(b-a)$ so $X=a+(b-a)U$. Thus the expected value E(X) = E($a + (b -a)U$) which equals $(a+b)/2$.</p> <p>I don't understand why we subtract a from X and then divide by b - a. The intuition just doesn't make sense to me. </p> <p>-How does this make it so that the distribution is defined from 0 to 1 with density 1 instead of the original definition on (a,b) with density $1/(b-a)$?</p> <p>-Also, what is the mathematically correct way to derive E(U)?</p> Answer: <p>We have $X$ which is a random variable of uniform distribution on $[a,b]$. Its expected value is the midpoint of the interval, $\frac{a+b}2$ (you can also verify it by the integral $\int_a^bx\cdot\frac1{b-a}dx$).</p> <p>Now, at any possible experiment $X$ gets a concrete value, and this value is in $[a,b]$ with $1$ probability. How to move it to $[0,1]$? First move it to $[0,b-a]$ by substracting $a$, then divide by $b-a$ to get $1$ on the right.</p> <p>So, this $U:=\frac{X-a}{b-a}$ is another random variable, with uniform distribution on $[0,1]$, and $E(U)=1/2$ which can also be calculated as: $$E\left(\frac{X-a}{b-a}\right)=\frac{E(X)-a}{b-a}\ .$$ (If you are not convinced, write this as integral $\int\frac{x-a}{b-a}\cdot f_X(x)dx$ and remember that $a,b$ are constants.)</p>
https://math.stackexchange.com/questions/314244/scaling-a-uniform-distribution-probability
Question: <p>I have 3 random variables; X,Y, and Z. I am pretty familiar with law of total variance for two variables;</p> <p><span class="math-container">$Var(X) = E[Var(X|Y)] + Var[E(X|Y)]$</span>.</p> <p>(I'm sorry if the words are messy).</p> <p>Recently, I read some papers, which state law of total variance using three variables</p> <p><span class="math-container">$Var(X) = E[Var(X|Y,Z)] + Var[E(X|Y,Z)]$</span></p> <p>Here what I have got so far. First, I try to find <span class="math-container">$E[Var(X|Y,Z)]$</span> like this:</p> <p><span class="math-container">$Var[X|Y,Z] = E[(X-E(X|Y,Z))^2|Y,Z]=E[X^2|Y,Z]-(E[X|Y,Z])^2$</span></p> <p><span class="math-container">$E[Var(X|Y,Z)] = E[E[X^2|Y,Z]-(E[X|Y,Z])^2]$</span></p> <p>Then, using definition of variance, I find:</p> <p><span class="math-container">$Var[E(X|Y,Z)]=E[(E[X|Y,Z])^2]]-(E[E[X|Y,Z]])^2$</span></p> <p>Finally, the result I have now</p> <p><span class="math-container">\begin{align} E[Var(X|Y,Z)] + Var[E(X|Y,Z)] &amp;= E[E[X^2|Y,Z]]-(E[X|Y,Z])^2]+E[(E[X|Y,Z])^2]-(E[E[X|Y,Z]])^2 \\ &amp;= E[E[X^2|Y,Z] ]-(E[E[X|Y,Z]])^2 \end{align}</span></p> <p>After this, I try to use a property for expectation where</p> <p><span class="math-container">$E(E[X|Y,Z]|Z)=E(X|Y)$</span>. But I am not sure if I go the right way and I am not even sure by now if the law of total variance can be used that way. Any kind of help would be appreciated. Thanks!</p> Answer: <p>You have : <span class="math-container">$$E\big(E[X|Y,Z]\big|Y,Z\big) = E(X)$$</span> This is just the usual property, applied with the random variable <span class="math-container">$(Y,Z)$</span>, or if you want, you can rederive it like this : <span class="math-container">\begin{align} E[E[X|Y,Z]] &amp;= E[ E [E [X|Y,Z]|Z]] \\ &amp;= E[E[X|Y]] \\ &amp;= E[X] \end{align}</span></p>
https://math.stackexchange.com/questions/4185243/law-of-total-variance-using-three-different-variables
Question: <p>For a set of column vectors $x_1,\dots,x_n$, the identity shows that $\sum_{i=1}^n x_i x_i^T = X^TX$. I can show this by seeing the $(p,q)$ entry of the resulting matrix is $\sum_{i=1}^n (X^T)_{pi}X_{iq} = \sum_{i=1}^n x_{ip} x_{iq}$. Is there a quicker way of seeing this? and, does $xx^T$ have a special name?</p> Answer: <p>What you have written is true in general. If $A = \begin{pmatrix} a_1 &amp; a_2 &amp; \cdots &amp;a_n\end{pmatrix}$ and $B = \begin{pmatrix} b_1 &amp; b_2 &amp; \cdots &amp; b_n \end{pmatrix}$, then $$AB^T = \sum_{k=1}^{n} a_k b_k^T$$</p>
https://math.stackexchange.com/questions/210920/a-question-about-sum-i-1n-x-i-x-it-xtx
Question: <p>Various statistical techniques are based on the assumption that two samples have the same variance and Bartlett's test is meant to check for that. Using R I made a few tests with randomly generated numbers. For example:</p> <p>bartlett.test(list(rnorm(10,sd=1),rnorm(10,sd=2)))</p> <p>will perform a Bartlett test on two vectors of 10 random numbers, where the random numbers are uniformly distributed with mean zero and standard deviation 1 and 2. When doing this with two vectors with the same standard deviation (and thus same variation) Bartlett's test will reliably confirm the null hypothesis of equal variances even with small sample sizes like 10, so there is a low risk of a type I error. However, if you do the test with different variances and a smallish sample size like 10 as in the example, Bartlett's test will confirm the null hypothesis around half the time (on repeated execution of the above line, depending on the particular random numbers it used). Although the variances differ by quite a lot, Bartlett's test will frequently not detect this with this sample size and make a type II error. If you increase the sample size, this effect disappears, as expected. </p> <p>I read about Bartlett's test in multiple stats books and looked at the wikipedia entry but none of them seem to mention this high risk of a type II error for small samples. Is this known or did I miss something?</p> <p>For practical applications, a type II error seem to be the bigger problem here as one will continue to work with the assumption of equal variances although it is false and thus reach statistical conclusions that are a lot stronger than they should be.</p> Answer:
https://math.stackexchange.com/questions/1136378/type-ii-errors-in-bartletts-test
Question: <p>I've recently been going through Khan Academy Statistics, and I recently came across the fact that sample standard deviation is biased. Now, I know that there are many proofs online including several on math stack exchange, but I was wondering if someone could give me some intuition for why this happens instead of using technical methods (like Jensen's inequality)? Please keep in mind my mathematical/statistical knowledge is equivalent to that of a grade 11 student. </p> <p>Any help would be greatly appreciated!</p> Answer: <p>Reproduced from my argument in an <a href="https://artofproblemsolving.com/community/c7h216088_n__1_in_standard_deviation_formula" rel="nofollow noreferrer">AoPS thread</a>, also featuring a derivation of the sample variance:</p> <p>The square root of this estimate for the variance is not an unbiased estimator of the standard deviation, because square roots and expected values don't commute.</p> <p>A simple example: let <span class="math-container">$ X$</span> be the probability distribution which is <span class="math-container">$ 1$</span> or <span class="math-container">$ -1$</span> with equal probabilities <span class="math-container">$ \frac12$</span>. It has mean zero and variance <span class="math-container">$ 1$</span>. Sample it twice. Half the time, our samples are equal, and the variance estimate we get is zero. The other half of the time, our samples differ by <span class="math-container">$ 2$</span>, and the variance estimate we get is <span class="math-container">$ 2$</span>. The average of those estimates is <span class="math-container">$ 1$</span>, confirming the fact that it's an unbiased estimator.</p> <p>Now, what if we take the square root of this estimated variance and call it an estimate for the standard deviation? We get zero half the time and <span class="math-container">$ \sqrt{2}$</span> the other half, for an expected value of <span class="math-container">$ \frac{\sqrt{2}}{2}$</span>, not equal to the original standard deviation.</p> <p>This sort of thing is guaranteed to happen. The concavity of the square root means that the expected value of this standard deviation estimate will always be too low. Worse, we can't simply scale our way out of the problem, because the details of how low it is depend on the distribution. Try the same two-point estimate on a uniform distribution on <span class="math-container">$ [0,1]$</span>; the average length between our two points is <span class="math-container">$ \frac13$</span>, so the estimated standard deviation is <span class="math-container">$ \frac1{3\sqrt{2}}$</span>. The real standard deviation is <span class="math-container">$ \frac1{2\sqrt{3}}$</span>, a multiple of <span class="math-container">$ \frac{\sqrt{3}}{\sqrt{2}}$</span> larger.</p> <p>There is no generic unbiased estimator for the standard deviation. We have to make do with a biased one, and the square root of our unbiased variance estimator is a good choice.</p>
https://math.stackexchange.com/questions/3145907/why-is-sample-standard-deviation-biased
Question: <p>I have seen <a href="https://math.stackexchange.com/questions/3622994/random-sample-random-variables-or-realizations-of-the-same-random-variable">this</a> question and it does not quite answer my question.</p> <p>I have always had some confusion about the concept of a random variable, and how in statistics everything gets viewed as a random variable. My understanding of a random variable is that its some random event with outcomes. Wikipedia defines it as a function from the sample space into a subset of the real numbers, and it just seems that the purpose of the mapping is to take potentially categorical values and map them to quantitative. To outline my confusion I will use the Central Limit Theorem.</p> <p>The Central Limit Theorem is typically stated as:</p> <p>Let <span class="math-container">$\{X_{1},\dots,X_{n} \}$</span> be a sequence of iid random variables having a distribution with expected value given by <span class="math-container">$\mu$</span> and finite variance given by <span class="math-container">$\sigma^2$</span>.</p> <p>Suppose we are interested in the sample average</p> <p><span class="math-container">$$\bar{X}_n = \frac{X_1 + \dots + X_{n}}{n}.$$</span></p> <p>Then <span class="math-container">$\bar{X}_n \to \mu$</span> as <span class="math-container">$n \to \infty$</span>.</p> <p>But if each <span class="math-container">$X_i$</span> is identical function on the domain that is the sample space, what does this summation even mean? I know the goal in mathematics is to always state things as generally as possible, but the way I interpret the central limit theorem is saying that if I pull a sample of size <span class="math-container">$n$</span>, that is, I randomly choose <span class="math-container">$n$</span> elements from the sample space, as I let <span class="math-container">$n$</span> go to infinity then the sample mean will be approximately normally distributed with mean <span class="math-container">$\mu$</span> and variance <span class="math-container">$\sigma^2$</span>.</p> <p>What good does it do to think of the samples as random variables? What does it mean to arithmetically add up and divide functions?</p> <p>Or is it perhaps viewing <span class="math-container">$\bar{X}_n$</span> as a random variable, that is literally the scaled additive sum of functions?</p> <p>Also is the concept of the probability distribution distinct from the random variable to which it is associated? The way wikipedia defines it, it seems any binary outcome would be the same random variable since they could be defined as a function on the set {0,1}, but they could have very many different distributions.</p> Answer: <p>There is a tendency in probability to not talk about the sample space -- instead, one defines random variables and their distributions, and it is implied that the sample space will be &quot;big enough&quot; for them to work out.</p> <p>The statement &quot;Let <span class="math-container">$X_1, ... X_n$</span> be i.i.d. with the distribution of <span class="math-container">$X$</span>&quot; really means if <span class="math-container">$X$</span> is a random variable on a probability space <span class="math-container">$(\Omega, \mathcal{F}, P)$</span> (i.e. <span class="math-container">$X: \Omega \to \mathbb{R}$</span>), then consider the <em>new</em> probability space, which is the product space of the original probability space <span class="math-container">$(\Omega \times \Omega \times ... \times \Omega, ..., P \times P)$</span> (where I've ommitted the event space -- the right notion of a <a href="https://en.wikipedia.org/wiki/Product_measure" rel="nofollow noreferrer">&quot;product <span class="math-container">$\sigma$</span>-algebra&quot; is a little subtle</a>).</p> <p>Each <span class="math-container">$X_i$</span> is not defined on the original sample space <span class="math-container">$\Omega$</span>, but is rather a random variable on the new product sample spaces -- and then, their sum actually makes sense.</p> <blockquote> <p>Also is the concept of the probability distribution distinct from the random variable to which it is associated?</p> </blockquote> <p>A probability space is the triple <span class="math-container">$(\Omega, \mathcal{F}, P)$</span> -- one can define many different random variables on such a space, and the <em>distribution</em> of such a random variable is a measure on <span class="math-container">$\mathbb{R}$</span>. But the random variable is <em>much more</em> information than it's distribution.</p> <p>For example, suppose <span class="math-container">$\Omega = \{ 0, 1 \}$</span>, with <span class="math-container">$P(1) = p$</span>, <span class="math-container">$P(0) = 1 - p$</span>. then I could define one random variable <span class="math-container">$X: \Omega \to \mathbb{R}$</span> to be the identity <span class="math-container">$\omega \mapsto \omega$</span>, and another to be <span class="math-container">$Y: \omega \mapsto 1- \omega$</span>. The distributions of these RVs are <span class="math-container">$P(X = 0) = 1 - p, P(X = 1) = p$</span> and <span class="math-container">$P(Y = 0) = p, P(Y = 1) = 1 - p$</span> respectively. But the two RVs are <em>correlated</em> -- <span class="math-container">$Y$</span> is always <span class="math-container">$1 - X$</span>.</p> <p>On the other hand, I could consider the product space <span class="math-container">$Omega = \{ 0, 1 \}^2$</span> -- now there are 4 possible outcomes, <span class="math-container">$(0, 0), (0, 1), (1, 0), (1, 1)$</span>. Assume all 4 are equally likely, define a random variable <span class="math-container">$X$</span> that simply returns the first element of the pair, and a random variable <span class="math-container">$Y$</span> that returns 1 minus the second element of the pair. This <span class="math-container">$X$</span> and <span class="math-container">$Y$</span> have <em>exactly the same distribution</em> as the previous ones, but they are <em>completely different</em> as random variables. In particular, they are entirely independent (and thus uncorrelated).</p>
https://math.stackexchange.com/questions/5038130/sample-random-variable-or-both
Question: <p>How can I calculate the mode in a grouped frequency distribution when the largest frequency occurs in two or more classes?</p> Answer: <p>If the you have a frequency distribution where the largest frequency occurs in two or more classes, then we call it a <a href="https://en.wikipedia.org/wiki/Multimodal_distribution" rel="nofollow">multimodal distribution</a>. For example, if you set of data is $\{1,1,1,2,2,3,4,7,7,7,8\}$, the mode would be both of the values $1$ and $7$.</p>
https://math.stackexchange.com/questions/1311506/calculating-mode-in-a-grouped-frequency-distribution
Question: <p><span class="math-container">$T_1$</span> and <span class="math-container">$T_2$</span> are unbiased estimators of <span class="math-container">$\theta$</span>. Then <span class="math-container">$T_3=aT_1+(1-a)T_2$</span> is also an unbiased estimator of <span class="math-container">$\theta$</span>.</p> <p>If <span class="math-container">$T_1$</span> and <span class="math-container">$T_2$</span> are independent, determine the best choice of <span class="math-container">$a$</span> so that <span class="math-container">$Var(T_3)$</span> is the smallest.</p> <p>I know I have to differentiate the variance of <span class="math-container">$T_3$</span> and make it equal to <span class="math-container">$0$</span>, but I am struggling to find the variances of <span class="math-container">$T_1$</span> and <span class="math-container">$T_2$</span>.</p> <p>I have: <span class="math-container">$$Var(T_3)=a^2 Var(T_1) + (1-a)^2 Var(T_2)$$</span> but I can't figure out how to get any further? I have tried to consider covariance but it doesn't help.</p> Answer: <p>Denoting the variance as $\sigma^2$ and the expectation with an overline,</p> <p>$$\sigma^2_{T_3}=\overline{(a(T_1-T)+(1-a)(T_2-T))^2}\\ =\overline{a^2(T_1-T)^2+2a(1-a)(T_1-T)(T_2-T)+(1-a)^2(T_2-T)}\\ =a^2\overline{(T_1-T)^2}+(1-a)^2\overline{(T_2-T)^2}\\ =a^2\sigma^2_{T_1}+(1-a)^2\sigma^2_{T_2}.$$</p> <p>This is a quadratic polynomial in $a$,</p> <p>$$(\sigma^2_{T_1}+\sigma^2_{T_2})a^2-2\sigma^2_{T_2}a+\sigma^2_{T_2}$$ which achieves its maximum at $$a=\frac{\sigma^2_{T_2}}{\sigma^2_{T_1}+\sigma^2_{T_2}}.$$</p> <p>and the minimum variance is $$\frac{\sigma^2_{T_1}\sigma^2_{T_2}}{\sigma^2_{T_1}+\sigma^2_{T_2}}.$$</p> <p>In particular, when $\sigma^2_{T_1}=\sigma^2_{T_2}$ we get $a=\frac12$ and $\sigma^2_{T_3}=\frac12\sigma^2_{T_1}$.</p>
https://math.stackexchange.com/questions/1902968/variance-of-an-unbiased-estimator
Question: <p>It is often said that degree of freedom causes the need for standard deviation formula to be corrected. When explaining degree of freedom, it is often said that when one knows the mean of the formula, only $n-1$ data are actually needed, as the last data can be determined using mean and $n-1$ data. However, I see the same thing occuring in population - not just in sample. So what's going on here, and how is this justification really working?</p> <p>For example, in simple linear regression model, variance of error terms are often sum of variance of each data divided by $n-2$. This is justified as said above. But if this justification is also true for population, not just sample, how is this really working?</p> Answer: <p>Note that if the sample points $X_i$'s are iid normal then $\frac{1}{\sigma^2}\sum_{i=1}^n(X_i-\bar{X})^2$ follows $\chi^2_{n-1}$ distribution where $\bar{X}$ is the sample mean while $\frac{1}{\sigma^2}\sum_{i=1}^n(X_i-\mu)^2$ follows $\chi^2_n$ distribution, where $\mu$ is the population mean. The suffix of $\chi^2$ is named as the degrees of freedom of the chi square distribution. That is the significance of the term degrees of freedom. As expectation of a $\chi^2_{\nu}$ random variable is $\nu$, $\frac{1}{n-1}\sum_{i=1}^n(X_i-\bar{X})^2$ is an unbiased estimator of $\sigma^2$,population variance, whereas $\frac{1}{n}\sum_{i=1}^n(X_i-\mu)^2$ is the unbiased estimator of $\sigma^2$.</p> <p>Similarly $\frac{1}{\sigma^2}\sum_{i=1}^n(y_i-\hat{\beta}_0-\hat{\beta}_1x_i)^2$ follows $\chi^2_{n-2}$ distribution under the assumption that the errors are iid $N(0,1)$ where $\hat{\beta}_0$ and $\hat{\beta}_1$ are the sample estimates of the regression coefficients whereas $\frac{1}{\sigma^2}\sum_{i=1}^n(y_i-{\beta}_0-{\beta}_1x_i)^2$ follows $\chi^2_{n}$ distribution where $\beta_0$ and $\beta_1$ are population regression coefficients.</p>
https://math.stackexchange.com/questions/487954/degree-of-freedom-and-corrected-standard-deviation
Question: <p>Apologies for the format of this question - I am new to this website. I am having trouble with part (c) of the question below, if anyone could assist that would be great.</p> <p>Thanks in advance</p> <p>Suppose that two independent random samples of size $n_1$ and $n_2$ observations are selected from normal populations. Let $X_1,\ldots,X_{n_1}$ and $Y_1,\ldots,Y_{n_2}$ be the two random samples and suppose that $X_i\overset d=N(\mu_1,\sigma^2)$ and $Y_i\overset d= N(\mu_2,\sigma^2).$ Note that we are assuming that the populations have a common variance $\sigma^2$. Define the sample variance from each sample as follows $$S_1^2=\dfrac {\sum_{i=1}^{n_1}(X_i-\overline X)^2} {n_1-1}\quad\text{and}\quad S_2^2=\dfrac {\sum_{i=1}^{n_2}(Y_i-\overline Y)^2} {n_2-1}. $$ Also define two pooled variance estimators $$S_{p_1}^2=\dfrac {(n_1-1)S_1^2+(n_2-1)S^2_2} {n_1+n_2-2}\quad\text{and}\quad S^2_{p_2}=\dfrac {1} {2}\left( S_1^2+S_2^2 \right).$$</p> <p><img src="https://i.sstatic.net/A9AGw.png" alt="questions"></p> Answer: <p>We have $$\begin{align} \text{Var}(S_{p1}^2) &amp;=\text{Var}\left(\frac{(n_1-1)S_1^2 +(n_2-1)S_2^2}{n_1+n_2-2}\right) \\&amp;= \left(\frac{n_1-1}{n_1+n_2-2}\right)^2\text{Var}(S_1^2)+\left(\frac{n_2-1}{n_1+n_2-2}\right)^2\text{Var}(S_2^2) \,\, \end{align}$$ and $$\begin{align} \text{Var}(S_{p2}^2) &amp;=\text{Var}\left(\frac{1}{2}(S_1^2+S_2^2)\right) \\&amp;= \frac{1}{4}\text{Var}(S_1^2+S_2^2) \\=&amp; \frac{1}{4}\left[\text{Var}(S_1^2) \, + \,\text{Var}(S_2^2)\right]\,\,. \end{align}$$ Thus, we need to compute $\text{Var}(S_i^2)$ for $i=1,2$ . To this end, we have $$\begin{align} \text{Var}(S_1^2) &amp;= \text{Var}\left(\frac{\sum_{i=1}^{n_1} (X_i - \bar{X})^2}{n_1 - 1}\right) \\&amp;= \frac{1}{(n_1 - 1)^2} \text{Var}\left(\sum_{i=1}^{n_1} (X_i - \bar{X})^2\right)\end{align}$$ and $$\begin{align} \text{Var}(S_2^2) &amp;= \text{Var}\left(\frac{\sum_{i=1}^{n_2} (Y_i - \bar{Y})^2}{n_2 - 1}\right) \\&amp;= \frac{1}{(n_2 - 1)^2} \text{Var}\left(\sum_{i=1}^{n_2} (Y_i - \bar{Y})^2\right) \,\,.\end{align}$$ It remains to compute $\text{Var}\left(\sum_{i=1}^{n_1} (X_i - \bar{X})^2\right)$ and $\text{Var}\left(\sum_{i=1}^{n_2} (Y_i - \bar{Y})^2\right)$, which I will leave to you. Let me know if you need help with this as well. <strong>Useful identity</strong>: $\text{Var}(X) = \text{Cov}(X,X)$ for any random variable $X$. Also, notice that if $n_1=n_2$, then $S_{p1}^{2} = S_{p2}^{2}$.</p>
https://math.stackexchange.com/questions/803199/pooled-variance-estimator-efficiency
Question: <p>I am comparing the drug exposures across two different groups, consisting of 1000 simulated drug exposures per group. Drug exposures are continuous variables following a normal distribution.</p> <p>I want to know if different doses yield a statistically significant difference in mean drug exposure across the two groups. I am observing that even if I calibrate &quot;artificially&quot; the doses to generate very similar mean exposures in both groups, all the statistical tests will always return very low p-values despite the very low difference in the groups' means. I guess this is due to the very large sample size (n = 1000 per group).</p> <p>However, if I reduce the sample size (to 50 virtual drug exposures, let's say) the exposure is very sensitive to the sampling procedure because the samples are taken from a distribution with high standard deviation compared to the mean, and repeating the same analysis on different datasets can give very different means in exposure.</p> <p>Is this a case where I should focus more on the &quot;biological relevance&quot; of the difference rather than the significance of such difference? Can you suggest a different approach to judging the relevance of the difference based on robust criteria?</p> Answer: <h1>Effect of Sample Size on Power of One-Way ANOVA</h1> <p>If you reduce sample sizes to 50 for each of the three treatment groups, you may not have sufficient power to distinguish among groups even if there are real differences among population means of the three groups.</p> <p>Just looking at the differences in sample means might be misleading. Relatively large differences in group sample means may not be real. You would have no way to judge 'biological significance'.</p> <p><strong>Three large samples.</strong> Let's start with an experiment with three groups, and 1000 observations per group. Here are sample sizes, means, and standard deviations for the three groups:</p> <pre><code>length(x1); length(x2); length(x3) [1] 1000 [1] 1000 [1] 1000 mean(x1); mean(x2); mean(x3) [1] 99.59983 [1] 100.0257 [1] 102.2992 sd(x1); sd(x2); sd(x3) [1] 15.55448 [1] 15.09188 [1] 15.12943 </code></pre> <p>The first two groups have means around 100, while the third group has a slightly larger mean above 102. We look at a one-way ANOVA to see if any of the differences are statistically significant.</p> <pre><code>x = c(x1,x2,x3) G = rep(1:3, each=1000) boxplot(x ~ G, col=&quot;skyblue2&quot;, pch=20) </code></pre> <p><a href="https://i.sstatic.net/tL1Ko.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/tL1Ko.png" alt="enter image description here" /></a></p> <p>Boxplots show small differences among the groups, but these boxplots don't show sample sizes so it is difficult to judge whether differences are significant. However a one-way ANOVA find at least one highly significant difference among the groups with P-value about 0.0001.</p> <pre><code>oneway.test(x ~ G) One-way analysis of means (not assuming equal variances) data: x and G F = 9.072, num df = 2.0, denom df = 1997.6, p-value = 0.0001196 </code></pre> <p><em>Ad hoc,</em> we can look at Welch t tests to see the pattern of differences among groups.</p> <pre><code>t.test(x1,x2)<span class="math-container">$p.val [1] 0.534387 t.test(x1,x3)$</span>p.val [1] 8.644751e-05 t.test(x2,x3)$p.val [1] 0.0007821064 </code></pre> <p>In order to avoid 'false discovery', testing the same data multiple times, we need to insist on P-values smaller than about 0.01 in order to declare significant differences. (See the Bonferroni method.) Even by that standard it seems clear that Groups 1 and 2 both differ significantly from Group 3 (but not from each other).</p> <p><strong>Three small samples.</strong> Now let's look at somewhat similar data, but with only 50 observations from each group.</p> <pre><code>length(y1); length(y2); length(y3) [1] 50 [1] 50 [1] 50 mean(y1); mean(y2); mean(y3) [1] 101.8843 [1] 100.4236 [1] 98.38178 sd(y1); sd(y2); sd(y3) [1] 16.67984 [1] 14.6449 [1] 13.79992 </code></pre> <p>One might get the idea from these data that Group 3 has a smaller population mean than Group 1.</p> <pre><code>y = c(y1,y2,y3) g = rep(1:3, each=50) boxplot(y ~ g, col=&quot;skyblue2&quot;, pch=10) </code></pre> <p><a href="https://i.sstatic.net/2JLPG.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/2JLPG.png" alt="enter image description here" /></a></p> <p>Again here, the boxplots may seem to show differences among groups. However, impressions are misguided that Group 3 may have a significantly smaller mean than one or both of the other groups. The one-way ANOVA shows no significant differences. The P-value 0.51 is nowhere near significant.</p> <pre><code>oneway.test(y ~ g) One-way analysis of means (not assuming equal variances) data: y and g F = 0.67898, num df = 2.000, denom df = 97.435, p-value = 0.5095 </code></pre> <p>With this failure to reject the null hypothesis that all three population means are equal, it would be wrong to use Welch t tests to look for differences. Failure to reject in the ANOVA has settled the matter.</p> <pre><code>oneway.test(y ~ g) One-way analysis of means (not assuming equal variances) data: y and g F = 0.67898, num df = 2.000, denom df = 97.435, p-value = 0.5095 </code></pre> <p>Actually, the <code>y</code>'s are just the first 50 observations from the <code>x</code>'s above. So there really are <em>population</em> differences among the <code>y</code>'s. But with only 50 observations per group, we do not have a sufficiently powerful ANOVA to find them. (It is just a curiosity of the randomness that the first 50 observations in <code>x1</code> happened to be unusually small, giving the false impression that Group 3 values are smaller.)</p> <p>You should always do a 'power and sample size' procedure at the very start of an experiment in order to plan large enough sample sizes to have reasonable chances of success identifying real differences.</p> <p>With population standard deviations as large as 15, it is not realistic to find differences as small as 2 or 3 among population means with only 50 observations per group.</p> <p><em>Notes:</em> (1) Here is how the <code>x</code> and <code>y</code> values were sampled using R:</p> <pre><code>set.seed(2020) x1 = rnorm(1000, 100, 15) x2 = rnorm(1000, 100, 15) x3 = rnorm(1000, 103, 15) y1 = x1[1:50] y2 = x2[1:50] y3 = x3[1:50] </code></pre> <p>(2) You may have noticed that I used a version of one-way ANOVA that does not assume equal variances. It uses a Welch-Satterthwaite approximation. Accordingly, I used Welch t tests (also not assuming equal variances) for <em>ad hoc</em> tests. For two-sample t tests, using the Welch version has become standard. The Welch test is the default in R and Minitab (to name two statistical programs I know about); you have to ask specifically for a pooled test if you want to insist on it.</p>
https://math.stackexchange.com/questions/3732609/statistical-comparisons-for-large-sample-sizes-n-1000
Question: <p>Two players, who have equal chances of winning each round, compete for a money prize. The first player to win three rounds collects the total amount. (a) If the game is interrupted when the score was 2 to 1, how should the players divide the stakes fairly? (b) What if the game was interrupted when the score was 1 to 0?</p> Answer:
https://math.stackexchange.com/questions/4446346/statistics-how-to-solve-this-problem
Question: <p>I am reading a book, it said:</p> <blockquote> <p>The expected power of a Monte Carlo test can be quite good even for relatively small values of m. In simple situations (testing means, for example), m = 99 may be a good choice. This allows the p-value to be expressed simply in two decimal places. In more complicated situations (inference concerning higher moments or relationships between variables), a value of m = 999 may be more appropriate. The p-value resulting from a Monte Carlo test is an estimate based on a sample of size m, so in general the larger m is, the better the estimate. In practical applications, it is not likely that a decision, other than to gather additional data, would be made based on more than two significant digits in a p-value.</p> </blockquote> <p>I am confused about &quot;p-value to be expressed simply in two decimal places&quot;. I don't understand.</p> Answer:
https://math.stackexchange.com/questions/4448901/ask-a-question-of-monte-carlo-test
Question: <p>Find <span class="math-container">$c$</span> for <span class="math-container">$P(\frac{5}{12}-c \le Y \le \frac{5}{12}+c)=\frac{1}{2}$</span></p> <p>We also have that <span class="math-container">$$f_Y(y) = k\sum_{i=0}^{\infty}y^i, y\in(1/3, 1/2) \\ \implies k\int_{1/3}^{1/2}\frac{1}{1-y}dy \implies k=\frac{1}{\log(\frac{4}{3})}$$</span></p> <p>What I have tried:</p> <p>I had thought to apply chebyshev's inequality, in this case <span class="math-container">$\sigma=1$</span>, so we have</p> <p><span class="math-container">$P(|Y-\frac{5}{12}|\le c)=\frac{1}{2} \\ \frac{1}{2} = 1-\frac{1}{c^2} \implies c = \sqrt{2} \\ \implies P(|Y-\frac{5}{12}| \le \sqrt{2})=\frac{1}{2}$</span></p> <p>However, a part of me thinks I need to use the standard normal distribution inequality to figure this out instead.</p> <p>Something like <span class="math-container">$$P\left(\frac{\frac{5}{12}-c}{1} \le Y \le \frac{\frac{5}{12}+c}{1} \right)=\frac{1}{2}$$</span></p> <p>and so we have to show that</p> <p><span class="math-container">$$\Phi(0) = \frac{1}{2} \\ \Phi(\frac{5}{12}+c)-\Phi(\frac{5}{12}-c)=\frac{1}{12} \\ \implies \Phi(\frac{5}{12}+c)-\left\{1-\Phi(c-\frac{5}{12}) \right\}\\ \text{we did that }\Phi(-z)=1-\Phi(z) \\ \implies \Phi(\frac{5}{12}+c) + \Phi(c-\frac{5}{12})-1=\frac{1}{2}$$</span></p> <p>If I plug in the value of <span class="math-container">$\sqrt{2}$</span> like in the previous inequality, then I do not get the value of <span class="math-container">$\frac{1}{2}$</span>. How do I approach this correctly with the chebyshev or standard normal?</p> Answer: <p>If the distribution is not &quot;normal&quot; then why would you think of applying tricks from normal distribution? . Secondly it is Chebycheff's <strong>Inequality</strong>. So applying it won't yield you any &quot;equality&quot; for <span class="math-container">$c$</span>.</p> <p><span class="math-container">$$P(\frac{5}{12}-c&lt;Y&lt;\frac{5}{12}+c)=k\int_{\frac{5}{12}-c}^{\frac{5}{12}+c}\frac{1}{1-y}\,dy = k\ln\bigg(\frac{\frac{7}{12}+c}{\frac{7}{12}-c}\bigg)$$</span>.</p> <p>This means that <span class="math-container">$$k\ln\bigg(\frac{\frac{7}{12}+c}{\frac{7}{12}-c}\bigg)=\frac{1}{2}$$</span></p> <p>So <span class="math-container">$$\bigg(\frac{\frac{7}{12}+c}{\frac{7}{12}-c}\bigg)=e^{\frac{1}{2k}}$$</span>.</p> <p>Now solve for <span class="math-container">$c$</span>.</p> <p>It would be wise of you to go back a step and re-read the definitions of the Probability Density function and why integrating over a set gives the probability of the random variable lying in that set.</p>
https://math.stackexchange.com/questions/4449026/find-c-for-p-frac512-c-le-y-le-frac512c-frac12
Question: <p>1) In a population of men, the probability that a man’s left eye is of brown colour is p, and the probability that a man’s right eye colour is brown is also p. Therefore the probability that a man has at least one eye of brown colour is: Pr(left eye brown or right eye brown) = Pr(left eye brown) + P(right eye brown) = 2p.</p> <hr> <p>To be eligible for a certain type of manual work in the petroleum industry, a male must be above both a certain minimum height and a certain minimum weight. The separate probabilities that these are satisfied are ph (for height) and pw (for weight). Therefore for a man selected at random, the probability that he meets both criteria for the job is: Pr( Meets height and weight criteria) = Pr(Meets height criterion) x Pr(Meets weight criterion) = ph x pw</p> <hr> <p>Suppose a student guesses the answers to three true/false questions. Whether the guess for any question is correct is independent of the guess for any other question being correct, and the probability of any guess being correct is 1=2. Overall, there are four possibilities for the number of questions the student guesses correctly, namely the student may guess 0; 1; 2; or 3 answers correctly. Therefore, because all four of these possibilities are equally likely, the probability that the student guesses all three questions correctly is 1=4.</p> Answer: <p><strong>First Approach:</strong> You are counting the case where someone has two brown eyes twice. I think this principle is called Inclusion-Exclusion. You should have $2p-p^2$.</p> <p><strong>Second Approach:</strong> The height and weight of someone aren't mutually exclusive. If they were, your approach would be perfectly fine.</p> <p><strong>Third Approach:</strong> Getting one question right is not the same as getting all three questions right. The probability that you get all questions right is $({\frac1 2})^3=\frac1 8$. The probability that you get two questions right is $\frac3 8$.</p>
https://math.stackexchange.com/questions/1930501/whats-wrong-with-this-approaches
Question: <p>I've had a look for intuitive explanations of the variance of an RV (e.g. <a href="https://math.stackexchange.com/questions/5392/intuitive-explanation-of-variance-and-moment-in-probability">Intuitive explanation of variance and moment in Probability</a>) but unfortunately for me, I still don't feel comfortable with the concept. Why would you opt to use variance over the standard deviation (which usefully is in the same units as the expectation)?</p> <p>Also, if the expectation, </p> <p>$E(X) = \Sigma_{i=0}^n i P(X = i)$,</p> <p>what is $E(X^2)$? Is it simply </p> <p>$E(X^2) = \Sigma_{i=0}^n i P(X^2 = i)$?</p> Answer: <p>The variance is easier to deal with in intermediate computations, because it doesn't have a square root. For example, if $X$ and $Y$ are independent, then $Var(X+Y) = Var(X) + Var(Y)$, which is a simpler formula than $SD(X+Y) = \sqrt{SD(X)^2 + SD(Y)^2}$. Basically, if you want to work in terms of standard deviation all the time then you end up doing a lot of squaring and square-rooting. </p> <p>Your claimed formula for $E(X^2)$ is almost true -- you're thinking of $X^2$ as a new random variable unrelated to $X$. To be strictly correct you'd need $E(X^2) = \sum_{i=0}^{n^2} i P(X^2 = i)$, since if $X$ can take values from $0$ to $n$ then $X^2$ can take values as large as $n^2$. But then you're faced with the problem of getting $P(X^2 = i)$. In practice one uses picakhu's formula $E(X^2) = \sum_{i=0}^n i^2 P(X=i)$.</p>
https://math.stackexchange.com/questions/31126/usefulness-of-variance
Question: <p>I am trying to establish correlation between tossing of coins and occurring of repeats.</p> <blockquote> <p>Coin is flipped 10 time as follows:</p> <p><span class="math-container">$${\rm H.T.H.H.H.T.H.T.T.T. }$$</span></p> <p>After each repeat occurring I have put (R) as follows:</p> <p><span class="math-container">$$ {\rm H.T.H.H(R).H(R).T.H.T.T(R).T(R). } $$</span></p> </blockquote> <p>So in this exercise I have 4 repeats, any patteren/symmetry/correlation could be estblised here?</p> <p>Is it fair to conclude in 10 toss I get 4 repeats and establish for 12th or 13th flip repeat is certain?</p> <p>(Stats novice)</p> Answer: <p>We assume the coin is fair. Then after the first toss, the probability of a repeat is $1/2$. For $k&gt;1$, the event there is an R at position $k$ is independent of previous locations of the R's. So if we toss the coin $n$ times, the number of R's has <em>binomial</em> distribution, where the number of trials is $n-1$, and the probability of success each time is $1/2$. Thus if $X$ is the total number of R's, then $$P(X=m)=\binom{n}{m}\left(\frac{1}{2}\right)^{n-1}.$$</p>
https://math.stackexchange.com/questions/128892/relation-between-repeat-number-in-coin-toss
Question: <p>I'm doing some revision here and I think one of the answers in my notes is wrong. It says on my notes the answer is D). Here's the question:</p> <blockquote> <p>A researcher conducted a large sample two-sided test of the null hypothesis that <span class="math-container">$u = 100$</span>. She reports a <span class="math-container">$p$</span>-value of <span class="math-container">$0.034$</span>.</p> <p>Which one of the following is correct?</p> <p>A). The null hypothesis is not rejected at <span class="math-container">$\alpha = 0.05$</span>.</p> <p>B). The <span class="math-container">$95\%$</span> confidence interval for <span class="math-container">$u$</span> would contain <span class="math-container">$100$</span>.</p> <p>C). The null hypothesis is not rejected at <span class="math-container">$\alpha = 0.01$</span>.</p> <p>D). The <span class="math-container">$99\%$</span> confidence interval for <span class="math-container">$u$</span> would contain <span class="math-container">$100$</span>.</p> </blockquote> <p>...actually I'm also wondering if the question itself is worded wrong because I see two statements that are true. Here's my thoughts:</p> <p>As it is a two sided test <span class="math-container">$\alpha = 0.05$</span> means there is a critical region on both sides of <span class="math-container">$0.025$</span></p> <p>A). This looks true to me as the <span class="math-container">$p$</span>-value of <span class="math-container">$0.034$</span> isn't greater than <span class="math-container">$0.025$</span></p> <p>B). There is no guarantee that a <span class="math-container">$95\%$</span> confidence interval will contain <span class="math-container">$u$</span> so false.</p> <p>C). Again this looks true to me as the <span class="math-container">$p$</span>-value of <span class="math-container">$0.034$</span> isnt greater than <span class="math-container">$\frac{\alpha}{2} = 0.005$</span> so the null won't be rejected.</p> <p>D). There is no guarantee that a <span class="math-container">$99\%$</span> confidence interval will contain the population mean <span class="math-container">$u$</span> so this is false.</p> Answer: <p>The factor of $2$ doesn't enter into comparing the $p$-value and the significance level. A $p$-value of $0.034$ means that if the null hypothesis were true data at least as extreme as the observed data would have been observed with probability $0.034$. That's enough to reject the null hypothesis at a significance level of $0.05$, independent of how "at least as extreme as" has been defined. The fact that it's a two-sided test means that "at least as extreme as" is taken to mean "as least as far away from $u=100$ on either side", so you're right to say that there are two critical regions, one on either side, and they both have area $\alpha/2$, but the $p$-value likewise takes into account both regions, one on each side, that are at least as far away from $u=100$ as the observed value(s).</p>
https://math.stackexchange.com/questions/139553/question-on-p-value-for-two-sided-test
Question: <blockquote> <p>I find the mass of liquid in a container by using</p> <blockquote> <p>mass of liquid = mass of (container+liquid) - mass of container</p> </blockquote> <p>My measurements are subject to an error with mean zero and standard deviation 0.7g. Find the standard deviation of the error in the calculated mass of the liquid.</p> </blockquote> <p>Is this to do with linear combination of standard deviations?</p> Answer: <p>Variance(mass of liquid) = Variance(mass of (container+liquid)) + Variance(mass of container) if the measurements of mass of (container+liquid) and mass of container are independent. </p>
https://math.stackexchange.com/questions/285101/combining-errors-given-standard-deviation
Question: <blockquote> <p>Let X and Y be discrete random variable with joint pdf <span class="math-container">$f(x,y) = 4/5xy$</span> if <span class="math-container">$x = 1,2$</span> and <span class="math-container">$y = 2,3$</span> and zero otherwise. Find:</p> <p>E(Y)</p> </blockquote> <p>Basically I found the marginal pdf and summed it up. I'll save you all the trouble of doing the work yourself. I just want to make sure my method is correct</p> <p><span class="math-container">$E(Y) = \sum_{y} yf(y) = \sum_{y=2,3}y6/5y = \sum_{y=2,3} 6/5 = 6/5 + 6/5 + 6/5 - 6/5 = 12/5$</span></p> <p>The answer in the book is 12/5 as well, but I wrote it out elaborately like I did above to check. I added and subtracted 6/5 because you have to start at y = 1 to sum up and then you have to subtract what you shouldn't have, i.e. 6/5. Is my method correct?</p> Answer: <p>It's generally a good idea to avoid notation like $4/5xy$ because it's ambiguous with respect to the order of operations; my tendency would have been to interpret it as $(4/5)xy$, whereas you apparently intended $4/(5xy)$.</p> <p>The notation $y=2,3$ is also suboptimal, both because $y$ is equated to two different values in a single equation and because many people around the world use decimal commas and might interpret this as $2.3$.</p> <p>Yes, your method is correct; it would have been OK though to write $\sum_{y\in\{2,3\}}6/5=6/5+6/5$ without adding and subtracting a term for $y=1$. </p>
https://math.stackexchange.com/questions/232669/expected-value-calculation
Question: <p>Currently, I am studying statistics as an undergraduate. Our lecture today finished with information about obtaining probability distributions and expected values (using binomial and geometric distributions).</p> <p>Later that day, after throwing some snow with some friends, I figured it would be neat to use what I learned to create a statistical project from throwing snowballs.</p> <h1>My Experiment</h1> <p>Three individuals stand in a triangle. Each individual has a die and a full deck of cards (excluding Jokers)</p> <p>Each person rolls their dice and flips a card at the same time. If the die lands on an even number, they throw a snowball to the individual at their left. If the card lands on an odd-valued card, the individual throws a snowball at the individual to their right.</p> <p>Once someone has been hit by 5 snowballs, that player is no longer in the match. However, once I started on this, I could not figure out how to calculate a probability distribution. I realized that, although it may seem easy at first, the hard part is accounting for whenever an individual may be eliminated. Also, I can't figure out the standard deviation or expected value for the random variable 'x' which I chose to represent the chance of an individual being hit.</p> <p>I would definitely be able to calculate this if this experiment was altered for only two individuals, but how can I use statistics to include the third individual? I really do enjoy statistics, and it's something I love to test. If anyone can guide me in the right direction, that would be appreciated!</p> Answer:
https://math.stackexchange.com/questions/1628596/how-to-obtain-this-particular-probability-distribution-and-standard-deviation
Question: <blockquote> <p>The city needs to perform some road maintenance and will rent excavator machines from a company.   Each excavator will work for at least one hour and no more than <span class="math-container">$4$</span> hours in a day.   The working time is evenly distributed.</p> <p>Given that a excavator has already worked for <span class="math-container">$2.5$</span> hours what is the probability that it will work at least <span class="math-container">$1$</span> more hour?</p> </blockquote> <p>I know that its a uniform distribution, I just do not know how to solve the questions, I know I am looking for <span class="math-container">$\mathsf P(P&gt;3.5 \mid P&gt;2.5)$</span> but I do not know how to solve it.</p> Answer: <p>As we have P (A|B)=P [A,B]/P (B) I,e P [x>3.5|x>2.5]=P [x>3.5,x>2.5]/P [x>2.5] =P [x>3.5]/P [x>2.5] since intersection of [x>3.5,x>2.5]=[x>3.5]</p>
https://math.stackexchange.com/questions/1712484/uniform-distribution-for-probability
Question: <p>It's a very basic high school statistical question, but I'm struggling to solve it.</p> <p>Suppose I have a school with <span class="math-container">$287$</span> students and each one made a test with <span class="math-container">$50$</span> questions (multiple choice questions with <span class="math-container">$5$</span> items each, they have to choose one item in each question). These questions are divided into the following subjects:</p> <blockquote> <p>Subject A - <span class="math-container">$8$</span> questions</p> <p>Subject B - <span class="math-container">$6$</span> questions</p> <p>Subject C - <span class="math-container">$10$</span> questions</p> <p>Subject D - <span class="math-container">$6$</span> questions</p> <p>Subject E - <span class="math-container">$6$</span> questions</p> <p>Subject F - <span class="math-container">$14$</span> questions</p> </blockquote> <p>We say a student fail the test when he doesn't solve any question.</p> <p>Then we have the following result:</p> <blockquote> <p>Subject A - <span class="math-container">$3$</span> students failed</p> <p>Subject B - <span class="math-container">$16$</span> students failed</p> <p>Subject C - <span class="math-container">$1$</span> students failed</p> <p>Subject D - <span class="math-container">$1$</span> students failed</p> <p>Subject E - <span class="math-container">$8$</span> students failed</p> <p>Subject F - <span class="math-container">$0$</span> students failed</p> </blockquote> <p>So how can I compare the performance of the students? In another words, which subject were they best and which one were they worse?</p> <p><strong>Remark:</strong> Each student has only two options: successful or failure, so in this case the overall score in each subject is not important.</p> Answer: <p>You define failure as scoring a zero on the test. Then of course, the students are more likely to score a zero if there are fewer questions. Let us say that a test has $n$ questions, and $5$ options per question. Then the probability of getting all the answers wrong is $(\frac{4}{5})^n$. So the probability of "not failing" is $1-(\frac{4}{5})^n$. So with $n$ questions and $287$ students, we expect that $(\frac{4}{5})^n(287)$ should fail. </p> <p>If the students together just put it to chance we expect $(\frac{4}{5})^n(287)$ to fail, but if they do something to sway the probability of getting an answer wrong down, then we should expect less to fail. </p> <p>Now I make a suggestion, I will define "better", you need not agree with it but I think it is logical: the subject which is "better" is the subject for which the signed percent error from the expected number of failures is minimum. When it is maximum that is when it is worse.</p> <p>$$(\frac{\text{observed}-(\frac{4}{5})^n(287)}{(\frac{4}{5})^n(287)})(100)$$</p> <p>According to this definition of better/worse if you put the subjects in order of better to worse this is what you get:</p> <p>$$F,D,C,A,E,B$$</p>
https://math.stackexchange.com/questions/2332766/which-subject-are-these-students-best-basic-high-school-statistical-question
Question: <p>The short form of my question is :</p> <p>Test A shows a useful result after one trial at 16% chance, two trials at 41,7% chance and after three trials with 75% chance. Is it better or worse to use it compared to test B which needs at least two trials and shows a useful result after two trials at 33,3% chance and after three trials with 100% chance. Assuming that you want to use one method until eternity.</p> <p>Long version:</p> <p>I have a question to work through my statistics homework (no solution demanded!):</p> <blockquote> <p>A company uses a computer with 6 energy regulators. Once in a while one of them gets broken. Unfortunately there is no way to figure out which is broken, but by testing each one of them. What is the more efficient method to check for long term?</p> <p>a) test each one after another b) make one isolated test with 3 (counts as one test) and then test the indicated group of three one by another</p> </blockquote> <p>I would say that this is just a box-experiment : 5 black balls, one white, without putting them back in the box.</p> <p>in a) you need at least 1 test, but given the worst case, you need 5 tests to find the bad one (either the 5th one is broken or it must be the 6th one).</p> <p>in b) you need at least 2 tests, but at the worst case 3 tests (isolate the group of three and test 2, if the second wasn't bad it must be the third).</p> <p>While it is obvious that at 3 tests you find the bad piece at a ratio of 100% with method b), the real question is : How likely is it that in a) you find the bad piece after one and two tests versus how likely is it that you find the bad peace after two tests with method b).</p> <p>And here I just use formulas for conditional probability from bayes theorem.</p> <p>That leads me to the following conclusion:</p> <p>After 2 tests, method a has a 41,7 % chance for success, method b 33,3%. After 3 tests method a has a 75% chance for success, while b has 100% chance.</p> <p>How do I now evaluate which one of them works better ?</p> <p>edit: How I got the numbers: for test b) the chance to get 1 out of the rest of 3 is 33,3% for test a) I used bayes theorem of conditional probability <span class="math-container">$p(find_ the broken_ peace|tested_ a_ good_ one_ before) = p(A|B)$</span> and then you receive the percentages.</p> Answer:
https://math.stackexchange.com/questions/3728841/how-to-evaluate-which-test-method-is-better
Question: <p>We have 81.000 different marbles in a box. With every grab, I get 30 different marbles out of the box. After this, the 30 marbles have to be thrown back into the box so that there are again 81.000 different marbles.</p> <p>How often do I have to grab into the box until I have statistically seen at least one time every single marble of these 81000 different marbles?</p> <p>Hope someone could help me with this question. Kind regards</p> Answer: <p>The question is a bit vague, but one interpretation is that we would like to know how many grabs are required, on average, to have drawn each marble at least once.</p> <p>A simplifying assumption seems appropriate here. I think we may as sell assume that grabbing a batch of <span class="math-container">$30$</span> marbles is about the same as drawing <span class="math-container">$30$</span> marbles one at a time with replacement, because the probability that <span class="math-container">$30$</span> marbles drawn one at a time are not all distinct is quite small--about <span class="math-container">$0.005$</span>.</p> <p>If we draw the marbles one at a time, then we have <a href="https://en.wikipedia.org/wiki/Coupon_collector%27s_problem#Calculating_the_expectation" rel="nofollow noreferrer">The Coupon Collector's Problem</a> with <span class="math-container">$n=81,000$</span> coupons. A well-known approximation for the expected number of draws required to get a complete set of coupons (i.e., marbles) is <span class="math-container">$$n \ln n + \gamma n + 0.5$$</span> where <span class="math-container">$\gamma \approx 0.5772$</span> is the Euler-Mascheroni constant. If we plug <span class="math-container">$n=81,000$</span> into this formula, we find that on average about <span class="math-container">$960,000$</span> draws are required. But those are single-marble draws, so if we grab batches of <span class="math-container">$30$</span> marbles then <span class="math-container">$960,000 / 30 =32,000$</span> grabs are required.</p>
https://math.stackexchange.com/questions/3739900/amount-of-trials-until-all-marbles-have-shown-in-a-box-of-different-marbles
Question: <p>I have sets of elements (lets call each <code>S</code>). The elements in each <code>S</code> can only ever be <code>black</code> or <code>white</code>. I also have a test that determines if an element is <code>black</code> or <code>white</code>, with some false-positive/false-negative rate <code>FP</code>/<code>FN</code>. Given all that, how do I determine the size of the sample from each <code>S</code> that I need to test in order to determine with confidence that there are less than X% <code>black</code>/<code>white</code> elements in <code>S</code>?<br /> Put differently, how to determine the number of elements that need to be tested, given <code>S</code>, <code>FP</code>, <code>FN</code> and <code>X%</code>, to allow me state with confidence e.g. &quot;Less than 5% of all elements in <code>S</code> are <code>black</code>&quot;.</p> <p>I vaguely know this is a ridiculously easy question. I'm a complete loss at statistics, and trying to state what I think my problem is...</p> Answer: <p>The problem of determining the sample size to estimate a proportion of the population is a typical textbook example. For example, if we think of each set <span class="math-container">$S$</span> as a coin, the task is to determine how many times should the coin be tossed to check whether it is unbiased. Or as another example, if we think of <span class="math-container">$S$</span> as a batch of items, the task is to determine how many items we need to sample to measure the proportion of defective items in each batch.</p> <p>The additional uncertainty in the form of errors when examining the sample makes the problem more difficult. We can simply try to correct the sample at the end, as we know the error rates. I will start with two approaches for determining sample size and propose a simple adjustment for the added uncertainty at the end.</p> <h2>First Approach</h2> <p>The simplest and most common approach to determine the sample size <span class="math-container">$n$</span> is the following; see also <a href="https://en.wikipedia.org/wiki/Sample_size_determination#Estimation_of_a_proportion" rel="nofollow noreferrer">Wiki Article</a>. Let <span class="math-container">$p$</span> be proportion of black elements in some set <span class="math-container">$S$</span>. Let <span class="math-container">$n$</span> be the sample size. The estimator of <span class="math-container">$p$</span> is the sample proportion: <span class="math-container">$$ \hat{p} = \text{proportion of black elements of $n$ elements sampled} $$</span></p> <p>Using the normal approximation, <span class="math-container">$P\%$</span> confidence interval for <span class="math-container">$p$</span> is <span class="math-container">$$ \hat{p} \pm z \sqrt{\frac{\hat{p}(1 - \hat{p})}{n}} $$</span> where <span class="math-container">$z$</span> is the critical value of standard normal distribution. The width <span class="math-container">$w$</span> of the confidence interval is: <span class="math-container">\begin{equation} w = 2 z \sqrt{\frac{\hat{p}(1 - \hat{p})}{n}} \label{eq: 1} \end{equation}</span> Half of the width <span class="math-container">$w/2$</span> is called a <em>margin of error</em>. To obtain the sample size <span class="math-container">$n$</span>, we need to choose a confidence level, for example <span class="math-container">$95\%$</span> giving <span class="math-container">$z = 1.96$</span>. And margin of error, for example <span class="math-container">$w/2=0.04$</span>, giving <span class="math-container">$w = 0.08$</span>. The equation still depends on the sample proportion <span class="math-container">$\hat{p}$</span>, but we don't know <span class="math-container">$\hat{p}$</span>. However, the expression <span class="math-container">$\hat{p}(1 - \hat{p})$</span> is maximized at 0.5. So, as the most conservative estimate, we can use 0.5 for <span class="math-container">$\hat{p}$</span>. Solving for <span class="math-container">$n$</span> we get: <span class="math-container">$$ n = \frac{z^2}{w^2} = \frac{1.96^{2}}{0.08^{2}} \approx 600 $$</span> Then, if it turns out that <span class="math-container">$\hat{p}$</span> is different than 0.5, the margin of error will just be smaller.</p> <h2>Second Approach</h2> <p>A little more involved approach to determining the sample size <span class="math-container">$n$</span> using a computer. Let <span class="math-container">$p$</span> be proportion of black elements in <span class="math-container">$S$</span>. Let <span class="math-container">$X$</span> be the number of black elements in a random sample of size <span class="math-container">$n$</span>. Then <span class="math-container">$X \sim \text{Binomial}(n, p)$</span>. Suppose we are testing hypotheses: <span class="math-container">$$ H_{0}: p = 0.05 \qquad \text{ versus } \qquad H_{1}: p &lt; 0.05 $$</span></p> <p>For different sample sizes <span class="math-container">$n=300, 400, \dots, 600$</span>, the following R code finds the rejection cut-off value <span class="math-container">$x$</span> and calculates the probability <span class="math-container">$\beta$</span> of rejecting the null hypothesis at level <span class="math-container">$\alpha$</span> for a particular alternative hypothesis <span class="math-container">$p = 0.025$</span>:</p> <pre><code>&gt; n = seq(300, 600, 100) &gt; x = qbinom(0.05, n, 0.05) - 1 &gt; alpha = pbinom(x, n, 0.05) &gt; beta = pbinom(x, n, 0.025) &gt; data.frame(n, x, alpha, beta) n x alpha beta 300 8 0.03406581 0.6628496 400 12 0.03550590 0.7939723 500 16 0.03429019 0.8721178 600 20 0.03195449 0.9196688 </code></pre> <p>From the results, we see that for <span class="math-container">$n = 600$</span>, the test with <span class="math-container">$\alpha &lt; 0.05$</span> has probability <span class="math-container">$\beta &gt; 0.9$</span> of rejecting the null hypothesis when alternative hypothesis <span class="math-container">$p = 0.025$</span> holds.</p> <h2>Adjustment for Sample Uncertainty</h2> <p>Now to the problem of having additional uncertainty in the form of errors when examining the sample. Let black elements be positive examples and white elements be negative examples. Let <span class="math-container">$d_1$</span> be the number of declared positive examples and <span class="math-container">$d_0$</span> the number of declared negative examples in the sample of size <span class="math-container">$n$</span>. Furthermore, let <span class="math-container">$a_1$</span> and <span class="math-container">$a_0$</span> be the number of actual positive and negative sampled examples respectively. Everything can be summarized in the error matrix:</p> <p><a href="https://i.sstatic.net/wnHGSm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/wnHGSm.png" alt="enter image description here" /></a></p> <p>Define false positive rate and false negative rate to be <span class="math-container">\begin{align*} f_{1} &amp;= \text{P}\left(\text{Declared}=1 \mid \text{Actual}=0\right)\\[.5em] f_{0} &amp;= \text{P}\left(\text{Declared}=0 \mid \text{Actual}=1\right) \end{align*}</span> Then <span class="math-container">\begin{align*} FP \sim \text{Binomial}(a_0, f_1), \qquad \text{E}[FP] &amp;= a_0 f_1 \\[.5em] FN \sim \text{Binomial}(a_1, f_0), \qquad \text{E}[FN] &amp;= a_1 f_0 \end{align*}</span> The definitions can be summarized in the following figure:</p> <p><a href="https://i.sstatic.net/LFVvqm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/LFVvqm.png" alt="enter image description here" /></a></p> <p>Finally, given <span class="math-container">$f_0, f_1$</span> and from observed <span class="math-container">$d_0, d_1$</span>, we get a system of equations: <span class="math-container">\begin{align*} f_1 a_0 + (1 - f_0) a_1 &amp;= d_1 \\[.5em] (1 - f_1) a_0 + f_0 a_1 &amp;= d_0 \end{align*}</span></p> <p>We can solve this for <span class="math-container">$a_0$</span> and <span class="math-container">$a_1$</span> when <span class="math-container">$f_0 + f_1 \neq 1$</span>: <span class="math-container">\begin{align*} a_0 = \frac{f_0 d_1 - (1 - f_0) d_0}{f_0 + f_1 - 1} \\[.5em] a_1 = \frac{f_1 d_0 - (1 - f_1) d_1}{f_0 + f_1 - 1} \end{align*}</span></p> <p>Thus, one way to resolve the added sample uncertainty is to simply use <span class="math-container">$\hat{p} = a_1/n$</span> to estimate the proportion of black elements <span class="math-container">$p$</span>. Then compute the confidence interval for <span class="math-container">$p$</span> using <span class="math-container">$\hat{p}$</span> and the normal approximation to test the null hypothesis. Or compare <span class="math-container">$a_1$</span> with computed rejection cut-off value <span class="math-container">$x$</span> from the second approach and reject the null hypothesis if <span class="math-container">$a_1 \leq x$</span>.</p> <p>For this to work, the error rates <span class="math-container">$f_0$</span> and <span class="math-container">$f_1$</span> would need to be very low. If <span class="math-container">$f_0 + f_1$</span> is large or close to 1, the calculation of <span class="math-container">$a_1$</span> gets very unstable making this adjustment useless.</p>
https://math.stackexchange.com/questions/4725391/how-to-choose-size-of-samples-to-determine-if-set-contains-elements
Question: <p>Lets say that we are trying to find the variance of a coin with a <span class="math-container">$0.6$</span> probability of heads flipped <span class="math-container">$n$</span> times. (Binomial with <span class="math-container">$p=0.6$</span>)</p> <p>Given that the equation to find variance is <span class="math-container">$E(n^2)-E(n)^2$</span> and that <span class="math-container">$E(n) = 0.6n$</span>:</p> <p>How are you supposed to find the <span class="math-container">$E(n^2)$</span>? I tried simply squaring the <span class="math-container">$n$</span>, resulting in <span class="math-container">$0.6n^2$</span> but it does not give me the correct answer when calculating the variance: <span class="math-container">$0.6n^2-0.36n^2=0.24n^2$</span>.</p> Answer: <p>Note the flips are independent, so <span class="math-container">$1$</span>-if-heads-<span class="math-container">$0$</span>-if-tails are <span class="math-container">$n$</span> independent variables across the flips. If you calculate the variance for one flip, the variance for <span class="math-container">$n$</span> flips is <span class="math-container">$n$</span> times this by additivity.</p>
https://math.stackexchange.com/questions/3202867/how-to-calculate-ex2-in-order-to-find-variance
Question: <p>The rule:</p> <p>In statistics, the 68–95–99.7 rule, also known as the three-sigma rule or empirical rule, states that nearly all values lie within 3 standard deviations of the mean in a normal distribution.</p> <p>About 68.27% of the values lie within 1 standard deviation of the mean. Similarly, about 95.45% of the values lie within 2 standard deviations of the mean. Nearly all (99.73%) of the values lie within 3 standard deviations of the mean.</p> <hr> <p>So suppose that I have a set of values (measurements) which has the normal distribution property. Let's call it S.</p> <p>When they say "about 68.27% of the values" what values do they mean? Do they mean that the standard deviation of any 68.27 % of the elements of S is smaller than 1? Do they mean something more? Could someone give me a precise mathematical statement that is equivalent to this "68–95–99.7 rule".</p> <p>I've posted this on math.stackexchange because I would like a mathematical answer.</p> Answer: <p>If $X$ is a normally distributed random variable, then $$\Pr\left(\left|\frac{X-\mu}{\sigma}\right|\le 1\right)\approx 0.6826.$$ Here $\mu$ is the population mean, and $\sigma$ is the population standard deviation.</p> <p>Similar facts hold for the other two numbers you mentioned. </p> <p>If we do repeated <strong>independent</strong> sampling, that can be represented as a sequence $X_1,X_2,X_3,\dots, X_n$ of independent random variables with the same mean and variance. If $n$ is large, then with reasonably probability the <em>proportion</em> of the sample results that lies between $\mu-\sigma$ and $\mu+\sigma$ will be not far from $68\%$. However, even with $n$ around $1000$, we can only be about $95\%$ sure that the experimental proportion will be between $65\%$ and $71\%$. </p>
https://math.stackexchange.com/questions/493046/precise-mathematical-translation-of-the-68-95-99-7-rulenot-a-proof
Question: <p>I have two sets of products A + B in the same product category. I have the overall and A's N, mean and variance. Can I calculate the variance of B with this?</p> <p>I noticed <a href="https://stats.stackexchange.com/questions/29170/how-to-compute-standard-deviation-of-difference-between-two-data-sets">this</a> answer, but I wonder whether in this case A and B are independent since they are products in the same product category?</p> <pre><code>+------------------+---------+--------+------------+-------------+ | Product category | Product | N | Mean | Variance | +------------------+---------+--------+------------+-------------+ | Z | A | 173 | 0.3475723 | 0.00291849 | | Z | A+B | 42938 | 0.2744357 | 0.009905348 | | Z | B | 42765 | 0.2741398 | ? | +------------------+---------+--------+------------+-------------+ </code></pre> Answer: <p>Let us denote the sample variance of Product A items as $$s_A^2 = \frac{1}{N_A - 1} \sum_{i=1}^{N_A} (A_i - \mu_A)^2,$$ and the sample variance of product B items as $$s_B^2 = \frac{1}{N_B - 1} \sum_{i=1}^{N_B} (B_i - \mu_B)^2,$$ where $N_A$, $N_B$ are the sample sizes for each product; $A_1, A_2, \ldots, A_{N_A}$ and $B_1, B_2, \ldots, B_{N_B}$ are the observations in each sample; and $\mu_A$ and $\mu_B$ are the sample means of each sample.</p> <p>We then also have $$s_{A+B}^2 = \frac{1}{N - 1} \left( \sum_{i=1}^{N_A} (A_i - \mu)^2 + \sum_{i=1}^{N_B} (B_i - \mu)^2 \right),$$ where $N = N_A + N_B$ is the pooled sample size, and $$\mu = \frac{1}{N} \left( \sum_{i=1}^{N_A} A_i + \sum_{i=1}^{N_B} B_i \right) = \frac{N_A \mu_A + N_B \mu_B}{N}$$ is the pooled mean. Your question is to compute $s_B^2$ given the quantities $s_A^2$, $\mu_A$ $\mu_B$ and $s_{A+B}^2$. To this end, it is clear that we must decompose the pooled variance somehow. Note $$(A_i - \mu)^2 = ((A_i - \mu_A) + (\mu_A - \mu))^2 = (A_i - \mu_A)^2 + 2(\mu_A - \mu)(A_i - \mu_A) + (\mu_A - \mu)^2,$$ so that $$\sum_{i=1}^{N_A} (A_i - \mu)^2 = (N_A - 1) s_A^2 + 2(\mu_A - \mu) (N_A \mu_A - N_A \mu_A) + N_A (\mu_A - \mu)^2 \\ = (N_A - 1) s_A^2 + N_A (\mu_A - \mu)^2.$$ Similarly, $$\sum_{i=1}^{N_B} (B_i - \mu)^2 = (N_B - 1) s_B^2 + N_B (\mu_B - \mu)^2 .$$ It immediately follows that $$(N - 1) s_{A+B}^2 = (N_A - 1) s_A^2 + (N_B - 1) s_B^2 + N_A (\mu_A - \mu)^2 + N_B (\mu_B - \mu)^2,$$ from which we can solve for $s_B^2$ in terms of the other quantities.</p> <p>It is worth noting that $$\mu_A - \mu = \frac{(N_A + N_B) \mu_A - N_A \mu_A - N_B \mu_B}{N} = \frac{N_B}{N} (\mu_A - \mu_B),$$ similarly $$\mu_B - \mu = \frac{N_A}{N} (\mu_B - \mu_A),$$ consequently $$(N-1) s_{A+B}^2 = (N_A - 1) s_A^2 + (N_B - 1) s_B^2 + \frac{N_A N_B}{N} (\mu_A - \mu_B)^2.$$</p>
https://math.stackexchange.com/questions/2238086/calculate-variance-of-a-subset
Question: <p>I have a shape <span class="math-container">$S$</span> of area <span class="math-container">$A$</span>, but I do not know what <span class="math-container">$A$</span> is. However, I do have the coordinates of <span class="math-container">$N$</span> points (the coords are <span class="math-container">$(x_i,y_i)$</span> for <span class="math-container">$i\in[1,N]$</span>) that follow a sampling distribution <span class="math-container">$D$</span>. The probability density of <span class="math-container">$D$</span> is <span class="math-container">$0$</span> on points not enclosed by <span class="math-container">$S$</span> and uniform for points enclosed by <span class="math-container">$S$</span>.</p> <p>What is the estimation of <span class="math-container">$A$</span>?</p> Answer: <p>The area of any shape can be written: <span class="math-container">$A=\sigma^2\gamma(S)$</span> where <span class="math-container">$\gamma$</span> is a scale factor and <span class="math-container">$\sigma$</span> is the 2D radius of gyration. <span class="math-container">$$\hat A=s^2\gamma(S)$$</span></p> <p>Where <span class="math-container">$s$</span> is the sample standard deviation.</p> <p>If we don't know what kind of shape <span class="math-container">$S$</span> we have, a simple choice is to treat the underlying area as ellipsoid. We calculate the covariance matrix <span class="math-container">$$\Sigma=\begin{bmatrix} \operatorname{var}(X) &amp; \operatorname{cov}(X,Y)\\ \operatorname{cov}(X,Y) &amp; \operatorname{var}(Y)\\ \end{bmatrix}$$</span> The eigenvectors of this matrix are in the direction of the semi-axes of the ellipse we're after and the eigenvalues are the variances in the respective semi-axes. We only need to look at the latter, and considering we desire (the square root of) their product, we simply require the determinant of the covariance matrix because this equals the product of the eigenvalues. <span class="math-container">$$A=\pi ab$$</span> If the points come from the ellipse defined by <span class="math-container">$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$</span>, the variance of <span class="math-container">$X$</span> is <span class="math-container">$\operatorname{var}(X)=\frac{a^2}{4}$</span>, and variance of <span class="math-container">$Y$</span> is <span class="math-container">$\operatorname{var}(Y)=\frac{b^2}{4}$</span>. That is to say that the length of the semi-axis is two standard deviations (i.e. <span class="math-container">$2\times\frac{a}{2}$</span>). <span class="math-container">$$\begin{align}\hat A &amp;= \pi(2\sigma_1)(2\sigma_2)\\ &amp;=4\pi\sqrt{\lambda_1}\sqrt{\lambda_2}\\&amp;=4\pi\sqrt{\operatorname{det}(\Sigma)}\end{align}$$</span> Our result is:</p> <p><span class="math-container">$$\begin{align}\hat A &amp;= 4\pi\sqrt{\operatorname{var}(X)\operatorname{var}(Y)-\left(\operatorname{cov}(X,Y)\right)^2} \end{align}$$</span></p>
https://math.stackexchange.com/questions/4732599/estimation-of-shape-area-given-random-points-inside-it
Question: <blockquote> <p>If the mean of a set of data is equal to the mode, is it always equal to the median? Explain why or why not.</p> </blockquote> <p>I would guess no, but after generating countless sets I cannot find anything that contradicts this</p> Answer:
https://math.stackexchange.com/questions/2227286/if-mean-mode-mean-median
Question: <p>This was found in a line from the proof of the law of large numbers. the $1\{X&gt;C\}$ is the usual indicator function. </p> Answer: <p>Define $Y = I\{X&gt;c\}$ then $$ EI\{X&gt;c\} =EY = 1P(X&gt;c)+0P(X\le c) = P(X&gt;c). $$ You can see that $Y \sim Bernoulli ( P(X&gt;c))$.</p>
https://math.stackexchange.com/questions/2244758/why-is-pxc-e1-xc
Question: <p>I like to ask you about salary payment scheme by a company. Here is interesting points of this company salary scheme. </p> <p><strong>New company payroll scheme</strong></p> <ol> <li>Salary is credit on every 25th of every month. </li> <li>Number of working days is 30 days flat. </li> <li>A few people are joined on 29th of March (previous month)</li> <li>Salary for April will be credited on 25th of April. </li> <li>Total working day calculated by the company pay scheme is 28 (3 days from March and 25 days from April. </li> </ol> <p>I already talked to the company payroll department that this is some kind of cheating in payroll scheme in compare to standard payroll scheme by other companies I worked for. </p> <p><strong>Standard payroll scheme</strong></p> <ol> <li>Joining date is 29 of March. </li> <li>Joining date is 29 March</li> <li>So working days is 3 day (29, 30, 31 of March)</li> <li>Number of working days can be flat (30 days). </li> <li>March salary is pro-rated. 3/30 so 1/10. </li> <li>On April 25 payroll must be calculated on Calendar month (full month salary) because it is salary credit day. Not to calculate as 25 working days in April. </li> </ol> <p>I have very doubt that combining 30 days per month calculation and payday 25th every month pro-rated calculation is for cheating salary calculation. I know there is some playing around payroll scheme to make some abuse or cheating. But in statistically I do not know how to prove that. Any help would do great for me. </p> Answer: <p>Of course HR is cheating - that's their job.</p>
https://math.stackexchange.com/questions/2227472/salary-scheme-is-hr-is-cheating
Question: <p>an urn contains 25 balls 40% of which are green. a contestant reaches in the urn to choose three balls the contestant will win 200 if he or she selects a green ball but will lose 120 for any other colour. is this a fair game</p> <p>A) the ball is replaced after each draw B) the ball is not replaced after each draw</p> Answer: <p>Whether balls are replaced or not is irrelevant in terms of <em>expected</em> winnings, since the expectation of what you replace obviously coincides with the expectation of what you draw (note that replacement does increase the variance, however). So, whether you replace balls or not, the expected winning per ball is $200\cdot 0.4 - 120 \cdot 0.6=80-72=8$, yielding an expected win of $3\cdot8=24$ over three balls. So it's not a fair game.</p>
https://math.stackexchange.com/questions/2165837/fair-game-question