47
votes
Could any equation have predicted the results of this simulation?
At any given point in the game, you're $3$ or fewer "perfect flips" away from winning.
For example, suppose you've flipped the following sequence so far:
$$
HTTHHHTTTTTTH
$$
You haven't won ...
22
votes
Could any equation have predicted the results of this simulation?
First, you can refactor your R code to be (IMHO) a little more legible, also using pbapply::pbreplicate() to get a nice progress bar:
...
17
votes
Could any equation have predicted the results of this simulation?
There is a fun way to answer this problem using martingales, and in particular using https://en.wikipedia.org/wiki/Optional_stopping_theorem. I first saw this trick in the book A First Look at ...
17
votes
Accepted
Are these valid histograms?
Histograms can be used to represent frequency (as in the examples you showed) or density.
Like you I was taught density histograms only, but frequency histograms are in very common use (and are the ...
15
votes
Accepted
Inverse transform method, theoretical graph not matching sample
This happens all the time with distributions that have infinite variance. (This one even has infinite expectation.) One or more extreme values can swamp all the others.
When all values are positive, ...
15
votes
Accepted
Histograms and R squared correlation
The histogram completely misses the pairing between predicted and observed values, so the histogram has nothing to do with the all-important residuals used to calculate $R^2$. For instance, if you ...
14
votes
Accepted
Why does re-scaling my density plot using counts change the y-axis so much?
The bottom line (here at the top) is that the vertical scale in the second series of plots is probability density, which not only is not the count or frequency in any bin, it is not probability either....
13
votes
Accepted
What distribution do I get when I square numbers from a normal distribution and add them together?
If $z$ has a standard normal distribution (mean of zero and variance of one), then $z^2$ has a chi-squared distribution with 1 degree of freedom.
Furthermore, the sum of $x$ and $y$ from chi-squared ...
12
votes
Accepted
Comparing two histograms using Chi-Square distance
@Silverfish asked for an expansion of the answer by PolatAlemdar, which was not given, so I will try to expand on it here.
Why the name chisquare distance? The chisquare test for contingency tables ...
12
votes
How do I quantify the uniformity of sampling time?
There are many metrics. They are best used in conjunction with visualizing the data appropriately.
Among the solutions worth considering are to compare the distributions of the frequencies (...
12
votes
Accepted
How far can be median, mode and mean be from each other and still be able to say that is a normal distribution?
How far can be median, mode and mean to still say that is a normal distribution?
This kind of gets things backward -- even if they were exactly equal, that's no basis on which to claim you have a ...
12
votes
Outlier detection for skewed data
For this kind of data, and any other univariate distribution, I have these recommendations.
1. Use what context you have to hand about the data. What is expected? What is or would be surprising or ...
12
votes
Accepted
Is there a name for a distribution where I can take log of its histogram and get back the same histogram?
To put this in more mathematical form, you want to be able to start with a random variable $X$, take a logarithm, then perhaps add and multiply by some numbers and get back the same distribution. $Y=a+...
11
votes
How does one graph the PDF of a variable having a mixed discrete-continuous distribution?
The two are not on the same "scale" (probability is p(x) for the discrete and f(x)dx for the continuous, so p and f are very different things); strictly speaking the way to draw the distribution for a ...
11
votes
Accepted
Why is the $x$ axis for a histogram labeled "bin"?
When wanting to create a histogram of a continuous variable, you first need to split those into bins (sometimes referred to as buckets). Subsequently, this procedure is called binning or bucketing.
...
11
votes
Are these valid histograms?
I think there is an ambiguity about what the "number of years" refers to. If it referred to a six year period, and then an eleven year period, etc., then the plots would not meet the ...
10
votes
Inverse transform method, theoretical graph not matching sample
I don't see anything wrong with the implementation of the inverse transform method.
The first distribution is strongly right-skewed. If you run your simulation, you should see that roughly 95% of ...
10
votes
Accepted
I have applied many statistical tests to my data, but still cannot determine normality
Normality Concerns
As it is my understanding, you would normally run a QQ plot for each group rather than the distribution as a whole, as you are testing two separate distributions against each other ...
10
votes
Why does re-scaling my density plot using counts change the y-axis so much?
The difference between the two figures is that one displays the probability density and the other the count density.
The total probability is always one (by definition). But the total counts can be ...
10
votes
Are these valid histograms?
How narrowly you want to define the term "histogram" is, I think, up to you. I'd say "yes, they are close enough to histograms that I would call them 'histograms'" but others may ...
9
votes
Why doesn't the fact that 1 median is lower than another median, mean that most in group 1 are less than most in group 2?
Here's the smallest counter-example I could find :
A ([1, 4, 10]) and B ([0, 6, 9]) have the same average (...
9
votes
Accepted
R histogram of p-values weird (uniform)?
Everything looks fine to me! Only the bar at the very left contain the p values up to 0.05 (and some more). So roughly 95% of p values are above 0.05, which is as expected under the null.
Actually, ...
8
votes
Accepted
testing if data is from a normal distribution
The key quote from the SO post you link is the following, especially the second half:
When the sample size is small, even big departures from normality are not detected, and when your sample size ...
8
votes
How far can be median, mode and mean be from each other and still be able to say that is a normal distribution?
No the distribution is certainly not normal. Normal distribution has a bell-curve shape and has mean = mode = median. However normal distribution is a synthetic mathematical function and no real life ...
8
votes
A question about Histogram-to-distribution transformation
Elementary textbooks often show 'frequency' $f$ or 'relative frequency' $r =f/n$ on the vertical axis of a histogram, where $f_i$ is the frequency of the $i$th interval and $n$ is the number of ...
8
votes
What is this "phenomenon" called?
This answer is not a direct answer to your question, because it relates to a different cause of the pattern.
But it does relate to the same graphical appearance, and therefore I post it as an answer ...
8
votes
Could any equation have predicted the results of this simulation?
Here is a somewhat clumsy brute-force method to obtain the probabilities and order statistics. Getting the mean will take more work.
So first just generate the possible sequences and associated ...
7
votes
What information does a Box Plot provide that a Histogram does not?
If I show you a histogram and ask you where the median is, you might be quite some time figuring it out... and then you'll only get an approximation to it. If I do the same with a boxplot you have it ...
7
votes
Why doesn't the fact that 1 median is lower than another median, mean that most in group 1 are less than most in group 2?
"Most men are faster than most women" is potentially a little ambiguous, but I would normally interpret the intent of it to be that if we look at random parirings, most of the time the man would be ...
7
votes
Accepted
Why doesn't the fact that 1 median is lower than another median, mean that most in group 1 are less than most in group 2?
I think that the reason you were marked as incorrect is not so much that the answer you gave to the multichoice question was wrong, rather that option 3 "Male and females have similar right skewed ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
histogram × 567distributions × 124
data-visualization × 88
r × 59
normal-distribution × 54
density-function × 45
probability × 39
binning × 33
chi-squared-test × 25
kernel-smoothing × 24
frequency × 22
descriptive-statistics × 20
density-estimation × 19
python × 17
mean × 17
normality-assumption × 17
skewness × 17
qq-plot × 16
self-study × 14
normalization × 14
machine-learning × 13
hypothesis-testing × 13
clustering × 13
matlab × 13
barplot × 13