<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>variable &#8211; Spencer Greenberg</title>
	<atom:link href="https://www.spencergreenberg.com/tag/variable/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.spencergreenberg.com</link>
	<description></description>
	<lastBuildDate>Sun, 03 Jan 2021 22:40:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://i0.wp.com/www.spencergreenberg.com/wp-content/uploads/2024/05/cropped-icon.png?fit=32%2C32&#038;ssl=1</url>
	<title>variable &#8211; Spencer Greenberg</title>
	<link>https://www.spencergreenberg.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">23753251</site>	<item>
		<title>Guessing the Probability Distribution</title>
		<link>https://www.spencergreenberg.com/2017/08/anticipating-variable-distribution/</link>
					<comments>https://www.spencergreenberg.com/2017/08/anticipating-variable-distribution/#respond</comments>
		
		<dc:creator><![CDATA[Spencer]]></dc:creator>
		<pubDate>Wed, 23 Aug 2017 10:22:00 +0000</pubDate>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[distribution]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[suggestion]]></category>
		<category><![CDATA[suggestions]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[variable]]></category>
		<guid isPermaLink="false">https://www.spencergreenberg.com/?p=1947</guid>

					<description><![CDATA[Tips for guessing what distribution a variable (or set of values) might have People often assume that the frequency with which a variable will take on different values (i.e., probability distribution) is likely to follow a bell curve (i.e., a normal distribution); this is often a mistake. Instead, consider these rules of thumb for deciding [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Tips for guessing what distribution a variable (or set of values) might have</p>



<p class="wp-block-paragraph">People often assume that the frequency with which a variable will take on different values (i.e., probability distribution) is likely to follow a bell curve (i.e., a normal distribution); this is often a mistake. Instead, consider these rules of thumb for deciding which probability distribution to use as a model in different situations:</p>



<p class="wp-block-paragraph">(1) Binomial &#8211; when flipping coins</p>



<p class="wp-block-paragraph">Number of occurrences out of a fixed number of tries: if the variable represents the number of times something happened out of a certain fixed number of trials that are at least mostly independent from each other (e.g., the number of times a team wins out of a fixed number of games, or the number of people on your mailing list that opened the last email you sent) then try modeling the probability of outcomes with a binomial distribution. Note that when the number of trials is large, and the rate of success is not too close to 0% or 100%, then this can be approximated with a normal distribution, but when the number of trials is small, or the rate of success is close to 0% or 100% a normal distribution may fit it very poorly.</p>



<p class="wp-block-paragraph">(2) Poisson &#8211; when watching the clock</p>



<p class="wp-block-paragraph">Number of occurrences in a fixed amount of time: if the variable represents the number of things of a certain type that happen within a fixed amount of time (e.g., 1 hour) and that time shouldn&#8217;t be affected by the time that&#8217;s elapsed since the last instance of the thing happening (e.g., the number of burglaries that will happen in a given city in a day, or the number of emails that you get on a Monday between 9 am, and 10 am) then try a Poisson distribution. Instead of fixed amounts of time, it can also be applied to fixed amounts of space or stuff, such as the number of mutations in a fixed-sized region of DNA once a given dose of radiation is applied.</p>



<p class="wp-block-paragraph">(3) Exponential &#8211; when luck fades</p>



<p class="wp-block-paragraph">Positive variables where larger values are always less likely than smaller values: if the variable is constrained to be positive and it&#8217;s reasonable to assume that higher values are always less likely than lower values, then the Exponential distribution may be a reasonable choice. It can also be applied to cases where the variable is constrained to be above a certain value rather than strictly positive (if we&#8217;re willing to shift the mean of the Exponential distribution). Exponential distributions are an especially good choice when modeling the time until an event if the estimated amount of time remaining until the event occurs is not affected by the amount of time elapsed so far (e.g., the amount of time until the next telephone call at a call center around a fixed time of day, say 2 pm). It is also the right choice when modeling how likely the thing is to occur when, with each amount of passing the time, the chance of the thing happening falls by a fixed percentage (e.g., the chance that someone has NOT gotten an injury after their nth day of riding a motorcycle if we can assume roughly a fixed chance of injury each day). Another application of the Exponential distribution is when you know a variable must be positive, but its maximum value is unlimited, and you know its mean value must be set in stone, but otherwise, you have the maximum uncertainty possible about outcomes of the distribution (i.e., you want to use the maximum entropy distribution for a known mean).</p>



<p class="wp-block-paragraph">(4) Gamma &#8211; when anything could happen (but it&#8217;s got to be positive)</p>



<p class="wp-block-paragraph">Positive variables that don&#8217;t have a clear maximum value &#8211; when the restriction of larger values being always less likely than smaller values is not necessarily valid (but you still have an unbounded variable that must be positive), then the Gamma distribution can be a reasonable choice. It generalizes the exponential distribution to a wider range of cases and also includes as a special case the famous chi-squared distribution. The Gamma distribution is useful for modeling things such as the total amount of rainfall in a certain country in a certain year (it must be a positive number, and we can&#8217;t say for sure that the maximum rain that has ever occurred is truly the maximum that could occur). Another example application would be the amount of time between one random car passing a certain point and the next car passing that point, which again must be positive but doesn&#8217;t have a clear maximum value.</p>



<p class="wp-block-paragraph">(5) Normal &#8211; when things just add up</p>



<p class="wp-block-paragraph">Sums of variables: if the variable can be thought of as a sum or average (or weighted average, where no one variable gets most of the weight) of other variables that aren&#8217;t that correlated to each other (e.g., human height, which can be approximated as being affected by a weighted average of different effects from different genes, or IQ test scores, which can be thought of as a sum of many different components of intelligence such as working memory, verbal comprehension, spatial reasoning, processing speed, practice taking such tests, focus, etc.) then try a Normal distribution (a.k.a. bell curve). Regarding human height, a Normal distribution fits it quite well if you consider adults, but even better if you just consider males or just consider females (since the male/female chromosome difference causes a relatively large change, which can be thought of as a variable with excessively large weight in the weighted average). A Normal distribution is also a good choice when you know that the center (e.g., mean or median) and width (e.g., standard deviation) are set in stone, but other than that, you have the maximum amount of uncertainty about what outcomes can occur (i.e., you want the maximum entropy distribution for a known mean and standard deviation), or when you&#8217;re trying to pick a reasonable prior distribution for the mean value of something (e.g., you want to express uncertainty about the mean of another probability distribution).</p>



<p class="wp-block-paragraph">(6) Log-normal &#8211; when luck is compounding</p>



<p class="wp-block-paragraph">Products of variables: if the variable can be thought of as a product of (as opposed to some of) positive variables that are at least mostly independent, or thought of as an accumulation of small percentage changes (from a positive starting point) due to different unrelated causes, then consider using a Log-normal distribution (a.k.a. Galton distribution). Examples where these assumptions seem to work reasonably well include, e.g., the income distribution of a large population (if we cut off the top 3% or so richest as that top tail may be better modeled as a Pareto distribution), or the distribution of populations of cities, or perhaps people&#8217;s total &#8220;success&#8221; in life by some fixed metric (excluding the very, very highest of achievers). The Log-normal distribution can also be a reasonable choice when a variable represents percentage changes in a thing from a fixed starting point of 1 (where 0 is the lowest possible value since it would indicate the thing is totally gone) when there is not a clear maximum (e.g., the distribution of returns for a diversified asset portfolio &#8211; though this distribution will leave out the extreme outlier tail risk caused by black swan events such as the world being hit by a huge Asteroid or a world-altering new technology). The log-normal distribution is also a reasonable choice when trying to set a prior distribution for a scale parameter (e.g., you need to use a probability distribution to model the uncertainty in the standard deviation of some other distribution) or if you expect the number of orders of magnitude of a thing to be well modeled by a normal distribution (so that the thing itself is the exponential of a normally distributed variable). When the mean is much larger than the standard deviation, a Log-normal distribution approximates a Normal distribution.</p>



<p class="wp-block-paragraph">(7) Beta &#8211; when possibilities are penned in</p>



<p class="wp-block-paragraph">Continuous variables constrained to be in a certain range: if the variable you&#8217;re trying to model the probability distribution of is a continuous variable that is only allowed to be in a bounded range (e.g., a corruption score that can be any value from 0 to 1 or a quality score in the range of 1 to 1000) consider using a Beta distribution (rescaled and/or shifted to cover the range of allowed values of your variable since by default the Beta distribution has the range 0 to 1). The Beta distribution works especially though well when the variable you&#8217;re trying to model the probability distribution of is itself a probability (which by definition is always going to be in the range of 0 to 1) or if you need a prior distribution for a variable that represents a probability. The Beta distribution can also work well when trying to model how likely the median value (or, more generally, the path percentile value) of a set of values is to take on different values if the original values are approximately uniformly distributed in the range 0 to 1. The commonly used uniform distribution, which assigns an equal likelihood to each value within the range 0 to 1 (and no chance to anything outside of that range), is a special case of the Beta distribution.</p>



<p class="wp-block-paragraph">(8) Pareto &#8211; when outcomes are driven by outliers</p>



<p class="wp-block-paragraph">80/20 type rules for positive variables: if you expect that the top X% of the outcomes will contribute Y% of the total, but ALSO that X% of those top X% will contribute Y% of the total of just that top group of outcomes, and X% of the top X% of the top X% will contribute Y% of the total of that top group of the top group, and so on and so forth, then consider using a Pareto distribution (a.k.a. power law). Many people believe this is the right model for the total value of startups or the amount of total funds raised by startups. The Pareto distribution also is a good choice when you are modeling the total outcome value of a thing that occurs over time, and a reasonable estimate for the value remaining to be added is proportional to the amount of value accumulated so far. So for instance, if a reasonable estimate for the final equity valuation of startups is 15% higher than the valuation at their last equity sale, then a Pareto distribution might be a reasonable choice to model equity valuation for startups. Or, to give another example, if the average time remaining for a project to finish is proportional to the amount of time elapsed so far, then the completion times of projects might follow a Pareto distribution. Pareto distributions can be good for modeling things where a lot of the total of all the outcomes is driven by really extreme outliers. Relatedly, Pareto distributions have the funny property that they can have infinite variance or even infinite mean for certain parameter values. Things in the real world don&#8217;t really seem to have infinite means or variances as far as we can tell, but in some cases, it could still be a reasonable model of real-world phenomena. As statistician George Box said, &#8220;all models are wrong, but some are useful.&#8221;</p>



<p class="wp-block-paragraph">(9) Gumbel &#8211; when you&#8217;re studying the worst-case scenario</p>



<p class="wp-block-paragraph">The maximum of a large number of values: if you are trying to model something characterized by a maximum (or minimum) of many values, such as the max amount of rainfall in a city / the max daily stock market decline / the maximum worldwide earthquake strength in any day over a ten year period, consider using a Gumbel distribution, Weibull distribution, or Fréchet distribution. Which to use depends on details about the &#8220;tails&#8221; of the distribution from which each individual value is drawn. See here for more details about &#8220;extreme value theory,&#8221; which characterizes what sort of distributions the maximum can have (when the maximum is taken over a large number of random values drawn from some distribution):&nbsp;<a target="_blank" href="https://en.wikipedia.org/wiki/Extreme_value_theory#Univariate_theory" rel="noreferrer noopener">https://en.wikipedia.org/wiki/Extreme_value_theory…</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.spencergreenberg.com/2017/08/anticipating-variable-distribution/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1947</post-id>	</item>
		<item>
		<title>Correlation Coefficient as a Gateway to Skepticism</title>
		<link>https://www.spencergreenberg.com/2017/06/correlation-coefficient-as-a-gateway-to-skepticism/</link>
					<comments>https://www.spencergreenberg.com/2017/06/correlation-coefficient-as-a-gateway-to-skepticism/#comments</comments>
		
		<dc:creator><![CDATA[Spencer]]></dc:creator>
		<pubDate>Wed, 14 Jun 2017 13:41:00 +0000</pubDate>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[cause]]></category>
		<category><![CDATA[coefficient]]></category>
		<category><![CDATA[correlation]]></category>
		<category><![CDATA[explanation]]></category>
		<category><![CDATA[happiness]]></category>
		<category><![CDATA[skepticism]]></category>
		<category><![CDATA[variable]]></category>
		<guid isPermaLink="false">https://www.spencergreenberg.com/?p=1546</guid>

					<description><![CDATA[The correlation coefficient as a gateway to radical skepticism:Suppose you calculate that two variables are moderately correlated. For instance, you find that self-reported happiness has a correlation r=0.32 with self-reported willpower, as I found in one of my studies. What are the possible explanations for (or causes of) this? A Causes B &#8211; Increasing A [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The correlation coefficient as a gateway to radical skepticism:<br>Suppose you calculate that two variables are moderately correlated. For instance, you find that self-reported happiness has a correlation r=0.32 with self-reported willpower, as I found in one of my studies.</p>



<p class="wp-block-paragraph"> What are the possible explanations for (or causes of) this?</p>



<ul class="wp-block-list"><li> <strong>A Causes B</strong> &#8211; Increasing A is a cause of increasing B but not the reverse. [e.g., more happiness causes more willpower]</li><li> (2) <strong>B Causes A</strong> &#8211; Increasing B is a cause of increasing A but not the reverse. [e.g., more willpower causes more happiness]</li><li> (3) <strong>A Causes B Causes A</strong> &#8211; Increasing A and B are both causes of increases of the other, leading to a positive feedback loop between them. [e.g., more willpower causes more happiness which causes more willpower which causes more happiness, etc.]</li><li> (4) <strong>X Causes A and B</strong> &#8211; There exists at least one other variable X (potentially many more than one) such that increases (or decreases) in X lead simultaneously to increases in both A and B. [e.g., living in a stable environment and having a supportive romantic partner are both situations that increase happiness and are also both situations that increase willpower]</li><li> (5) <strong>Non-linearity</strong> &#8211; A and B actually have a much stronger relationship than it appears (in fact they could be fully deterministically related) because correlation only captures the average extent to which A exceeding its mean coincides with B exceeding its mean, and can understate the strength of relationships that go both up and down or that go up in an inconsistent fashion (that is, it captures linear relationships, but can sometimes mask non-linear ones). [e.g., as willpower goes up happiness tends to go up as people become increasingly good at making good longer-term effective choices, but as willpower gets to extremely high levels, people start experiencing less happiness again because extreme levels of willpower are linked to reduced emotional responses of all kinds]</li><li> (6a) <strong>Noise</strong> &#8211; The correlation is actually much larger or smaller than it seems as a result of sampling error or noise (e.g., the sample size is too low to measure it with reliability, and so it is really more like 0.32 plus or minus 0.3 and could realistically be near zero) [e.g., with a sample size of n=30, a measured correlation of 0.32 has an insanely wide 95th percentile confidence interval of -0.045 to 0.609]</li><li> (6b) <strong>Too Many Tries </strong>&#8211; You found this correlation by looking at a long list of correlations that you calculated (and it stood out to you because it was one of the highest correlations), but there is actually not a significant correlation at all, it just looks that way because you tested so many hypotheses and each one had some chance of looking significant due to random fluctuations (so it&#8217;s unsurprising that one ended up being moderately large, and that&#8217;s the one you honed in on) [e.g., if you look at all pairs of correlations for 15 variables that leads to 105 distinct correlations, and with a sample size of 50 data points used to calculate each correlation, it is quite likely that you&#8217;d get a correlation of 0.32 or higher even if the true correlation between all pairs of variables was 0]</li><li> (7) <strong>Outliers</strong> &#8211; There is an extreme outlier in the data (e.g., a transcription error or data corruption or disgruntled survey respondent), and without it, the calculated correlation would decrease or increase dramatically. [e.g., with n=100 data points, a crazy outlier pair of 30 for A and 1.35 for B when the rest of your values are between 0 and 1 can make the calculated correlation come out to 0.32 when the correlation calculated without that one outlier is actually -0.12]</li><li> (8a) <strong>Selection Bias</strong> &#8211; Your data is a biased sample of the population that you actually care about due to unintentional selection effects in your sampling procedure, and so the 0.32 correlation, which you assumed applies to the broader population from which your data was drawn, is not actually representative of the population you are attempting to draw conclusions about. [e.g., you inadvertently surveyed only younger people, and in younger people, the correlation between willpower and happiness is positive, whereas in older people it is a negligible correlation, yet you&#8217;re trying to draw conclusions about the entire population which includes both young and old]</li><li> (8b) <strong>Correlation From Conditioning</strong> &#8211; The variables A and B are actually uncorrelated if you had looked at them in the full population of interest, but you only sampled them in some subpopulation out of convenience, and A and B are both correlated with how likely you are to end up in that subpopulation, creating an observed correlation in the subpopulation that doesn&#8217;t exist in the full population [e.g., happiness and willpower are actually uncorrelated, but you only collected data on people at camp, and whether or not a person decides to go to camp is strongly positively predicted by happiness and strongly negatively predicted by willpower; therefore campers are likely to have high happiness or low willpower (though not both) creating a correlation between happiness and willpower among campers that doesn&#8217;t exist among non-campers]</li><li>(9) <strong>The World Is Too Complex For Mere Mortals</strong> &#8211; Some mixture of (1), (2), (3), (4), (5) and (6a), (6b), (7), (8a), and (8b) are true.</li><li>(10) <strong>Wrong Problem</strong> &#8211; Of the literally infinite variety of formulas that capture the extent to which A and B vary together, the correlation (i.e., the average of the product of standard deviations from the mean) is not the formula you are truly interested in, what you actually care about is, say, the median of the product of absolute deviations from the median, but you calculated the ordinary correlation because that&#8217;s all that you could think of to do, or that&#8217;s the only relevant function the software you used had available.</li><li> (11) <strong>Undefined</strong> &#8211; A and B were generated from Cauchy distributions, and the true correlation between these two variables is mathematically undefined (much like how the Cauchy distribution has an undefined expected value), so your calculated value of 0.32 is a meaningless estimate of an undefined quantity.</li><li> (12) <strong>Bug</strong> &#8211; there was a bug in the correlation calculation or data loading code, or data cleaning code and your software just happened to output 0.32, but that&#8217;s not actually the correlation value or a value of interest at all.</li><li> (13) <strong>Wrong Calculation</strong> &#8211; You only thought you had run your correlation coefficient code, but you accidentally ran the wrong program (the one you wrote as a teen), and the number 0.32 was the fraction of baseball cards you had at that time that were in mint condition.</li><li> (14) <strong>Memory Mistake</strong> &#8211; Your faulty memory only makes you think the correlation between A and B is 0.32, when in fact, the correlation number you saw on your computer screen (a mere 60 seconds ago) was 0.23 (thanks be to the unreliable three pounds of jello between your ears).</li><li> (15) <strong>Dreaming</strong> &#8211; You are actually asleep right now (with your head slumped down on your keyword, and your knocked-over cup of tea dripping Earl Grey on the carpet), and you only dreamed that you calculated a 0.32 correlation, but when you wake up the correlation will turn out to be, say, -0.134 (or maybe you never collected the data in the first place and will get an F on your assignment).</li><li> (16) <strong>God</strong> &#8211; God, it turns out, predetermined everything, and is, therefore, the one and only cause, so is the true (and only) explanation for this correlation of 0.32.</li><li> (17) <strong>Solipsism</strong> &#8211; Metaphysical Solipsism turns out to be true, and the world has no independent existence outside of your mind, so in effect, you are the only cause, and therefore you are the cause of this experience of observation of 0.32 correlation (but what does it say about you that you would create this experience?)</li><li> (18) <strong>Many Worlds</strong> &#8211; The Many World&#8217;s hypothesis is true, and the laws of physics don&#8217;t forbid any possible values of this particular correlation, hence for any number r within the range -1 to 1, there is a you who witnessed that correlation r, but most you&#8217;s most likely witnessed a correlation close to 0.32 (as evidenced by the fact that you witnessed it and that you are unlikely to have witnessed an unlikely event).</li><li> (19) <strong>Simulation</strong> &#8211; The Simulation Hypothesis is true, you are part of a simulation, and the (simulated) world you live in was designed by conscious beings to have a 0.32 correlation between variables A and B (the true reason for which you will surely never understand, perhaps it has to do with getting published in a 5th dimension outer-reality academic journal on the niche topic of civilizational development in 4d space-time universes).</li><li> (20) <strong>Relativism</strong> &#8211; Truth and meaning are relative and culturally determined, and the definition and usage of correlation, as well as the ritualistic &#8220;scientific&#8221; process of calculating it, and the belief that it should be calculated at all, are merely an artifact of your time and place, which props up the power of the current ruling elite, yet is so deeply rooted in your culture that you fail to see any other possibility.</li><li> (21) <strong>Evil Demon</strong> &#8211; Descartes&#8217; Evil Demon, as &#8220;clever and deceitful as he is powerful,&#8221; has been tricking you for the entirety of what you call your life, and all that you think you know of the external world is merely an illusion designed by this demon, including this godforsaken correlation.</li><li> (22) <strong>Boltzmann Brains</strong> &#8211; The universe is infinite (in space, or time) and hence contains an infinite number of brains produced by the brief chance alignment of particles into structures capable of consciousness, and given that only a finite number of brains could evolve on planets, you have a 100% chance of being one of these randomly coalescing &#8220;Boltzmann brains,&#8221; and you just happen to be one that momentarily believes there is such a thing as correlation and that you measured a 0.32 correlation between A and B (in a moment you will pop back out of existence &#8211; bye!)</li><li> (23) <strong>Contradiction</strong> &#8211; There is an as of yet undiscovered (but as the Incompleteness Theorem shows, impossible to rule out) contradiction in the axioms of mathematics as we know it, and a valid mathematical proof exists to show that A and B have any correlation including -1, Pi or 0.32.</li><li><em>Or perhaps I&#8217;m overthinking this, and just: &#8220;as A goes up, B tends to go up a bit, on average.&#8221;</em></li></ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.spencergreenberg.com/2017/06/correlation-coefficient-as-a-gateway-to-skepticism/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1546</post-id>	</item>
	</channel>
</rss>
