<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kshitij Grover on Medium]]></title>
        <description><![CDATA[Stories by Kshitij Grover on Medium]]></description>
        <link>https://medium.com/@kshithappens?source=rss-881048cc8b48------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*M5HWsUycUZjCX7zfs9sTzQ.jpeg</url>
            <title>Stories by Kshitij Grover on Medium</title>
            <link>https://medium.com/@kshithappens?source=rss-881048cc8b48------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 06:08:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kshithappens/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Phone Control]]></title>
            <link>https://medium.com/@kshithappens/phone-control-667f70b9104b?source=rss-881048cc8b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/667f70b9104b</guid>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[messaging]]></category>
            <dc:creator><![CDATA[Kshitij Grover]]></dc:creator>
            <pubDate>Fri, 17 Mar 2017 20:35:34 GMT</pubDate>
            <atom:updated>2017-03-18T06:07:40.656Z</atom:updated>
            <content:encoded><![CDATA[<p>At various points, I’ve been super addicted to technology: Facebook, my phone, whatever it may be. Here, very simply, is what has helped me discipline my phone habits. It may not work for you, so take it in a high sodium way. I’ve ordered them from smallest steps to largest leaps.</p><p>(1) Keep Do Not Disturb (iPhone) always on. If you’re compulsively checking your phone already, there’s no reason to pay active attention to the buzzes. Pick up your device intentionally.</p><p>(2) Turn off Lockscreen and banner Notifications for all apps besides Messenger (and email, if you expect to need it more urgently). I did this for text messages as well. These things likely don’t need your active attention for most of the day.</p><p>(3) Uninstall Facebook, Instagram, Snapchat, etc. It’s straightforward: availability creates temptation.</p><p>(4) Log out of Facebook (and other mobile sites) on Web. After uninstalling, I would still occasionally go on m.facebook.com. This is much better than being pulled in, but adding an extra login layer helped a ton.</p><p>(4.5) Step 2, now for messaging apps. I found that muting messenger chats made me check more frequently because I expected new messages and knew I wouldn’t get the notifications. I moved to more drastic measures (5).</p><p>(5) Uninstall Messenger and Email. This was a drastic step for me, but it disillusioned me with respect to all the urgent things I thought I would be missing. People expect fast responses only if you’re willing to cater to them. Cater to yourself first.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=667f70b9104b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Normative Subjective Probability]]></title>
            <link>https://medium.com/@kshithappens/normative-subjective-probability-4202442d6fea?source=rss-881048cc8b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/4202442d6fea</guid>
            <category><![CDATA[philosophy]]></category>
            <dc:creator><![CDATA[Kshitij Grover]]></dc:creator>
            <pubDate>Fri, 13 Jan 2017 17:59:27 GMT</pubDate>
            <atom:updated>2017-01-13T17:59:27.436Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>“The Philosophy of Probability”, 12/9/2016</em></h4><h4>Introduction</h4><p>The subjective interpretation of probability identifies the concept with an agent’s <em>degrees of belief. </em>This is plausible in light of familiar statements such as “the probability that I will pass my exam is 30%”, or “there is a 60% chance I’ll catch a fish today”. This interpretation contrasts with objective theories such as frequency (occurrences of some event <em>A </em>out of total occurrences) or propensity (disposition of a system). After a brief technical setup, I will concede that this interpretation is not meant to be <em>descriptive</em>. Moreover, we will see that under a normative framework, it can still satisfy our desiderata for an interpretation of probability.</p><h4><strong>Utility/Betting Framework (Technical Setup)</strong></h4><p>De Finetti, Savage, and Ramsey formalize the notion of measuring subjective credences. Ramsey is able to build up an account of credences given just an agent’s preference ordering amongst some outcomes. Given numerical utilities and mathematical assumptions regarding the richness of the outcome space, we can find degrees of belief in any proposition <em>P’ </em>if we prefer an outcome <em>L</em> equally to <em>M</em> if P’, <em>N</em> if not P’. In friendly terms of money rather than utility, an agent’s probability is the amount she would pay for a bet that returned one unit only if <em>P’ </em>were true.</p><h4><strong>Subjective Credences and Rationality</strong></h4><p>Having made this notion more precise, why should we think degrees of belief express the concept of probability? Suppose we relate these partial beliefs back to our mathematical or formal axiomatization of the probability function <em>pr:</em></p><p>1. For all propositions <em>P</em>, pr(<em>P</em>) &gt;= 0.</p><p>2. If <em>P </em>is a logical truth or tautology, pr(<em>P</em>) is 1.</p><p>3. For disjoint <em>P</em> and <em>Q</em>, pr(<em>P or Q</em>) = pr(<em>P</em>) + pr(<em>Q</em>).</p><p>From experience, it is clear that <em>real</em> or <em>unconstrained</em> degrees of belief do not follow these axioms (are not “coherent”). In ordinary circumstances, we often do not assign full confidence to tautologies sufficiently complicated — and we are of course not logically omniscient to be able to. Moreover, as the work of Kahneman and Tversky (1974) shows, our conception and use of ‘probability’ <em>systematically </em>violates the probability theory. In studies, informed and naive subjects alike will judge the conjunction of two events to be more likely, and will judge the disjunction of two events to be less likely than the events themselves. Given that real degrees of belief are not coherent, our account can be modified as follows:</p><p><em>S</em>: Probability of <em>p</em> is the degree of belief of a <em>rational</em> agent would assign <em>p</em>.</p><p>What is a rational agent? In so far as being coherent with respect to the axioms, it has been demonstrated that any agent who avoids <em>sure loss</em> in betting scenarios (equivalently, questions of preference) as described above will automatically conform to the axioms, and vice versa. Even with such a minimalist constraint on betting behavior, it is difficult to imagine that such an agent exists given the finitude of human computation. To escape sure loss, real agents might avoid betting scenarios altogether, and yet their beliefs remain incoherent. Therefore, the pure subjective interpretation of probability does not pick out anything in the real world. Instead of abandoning the mathematical axioms altogether, I propose that we consider the subjective interpretation as <em>normative. </em>It forms a guide for what doxastic states we <em>ought to</em> hold.</p><h4><strong>The Strength of a Normative Interpretation</strong></h4><p>How does our revised account fair as an interpretation of probability? We require an interpretation to be (i) admissible, (ii) ascertainable, and (iii) applicable. We have turned from a positive to a normative account to satisfy admissibility: as the dutch book arguments show, an agent who avoids sure loss (“rational” by our definition) is certain to assign coherent probabilities that map directly onto the axioms. This is more than we can say for some objective accounts such as propensity, where it is unclear what value the propensity of a system takes on, or <em>why</em> we should think it is even related to the axioms.</p><p>The criterion of ascertainability requires more discussion. It might be thought that it will be impossible to ascertain, even in principle, the credences of a non-existent rational agent. This is misunderstanding the account: <em>rationality</em> does not require that agents hold specific (or even similar) distribution of probability values, but only that they are coherent. Though normative, our account is still permissive: <em>ascertaining</em> the probability is not a matter of finding one ‘correct’ probability for most propositions <em>P</em>. We should judge the ascertainability of interpretation <em>S </em>on the following criteria:</p><p>A. Can we measure degrees of belief?</p><p>B. Can we determine whether <em>S</em> allows for these beliefs?</p><p>On point (A), the subjective account is already remarkably strong: finding degrees of belief <em>qua</em> action via betting scenarios as described above requires reasonable base assumptions and little extrapolation. It might be objected (see Hajék and Erikkson 2007) that the story is not so simple after all: degrees of belief <em>identified</em> with betting odds leads to the usual problems with operationalism. If they are just <em>measured</em> by betting prices, the link is tenuous given that preference orderings might under-determine beliefs for different expected value functions (or simpler, one might have credences but no preferences). At this step, we have two similar choices:</p><p>1. Following Armendt, we should treat partial beliefs as dispositions that influence our choices under certain (and perhaps ideal) conditions. Relaxing a strict empirical notion of ascertainability is not catastrophic, especially since we are still better off than the limiting frequentist and the propensity advocate. (Armendt 1993, 9).</p><p>2. As Hajék himself does, we can choose to take degrees of belief as a <em>primitive</em> notion, but admit that in using it — sometimes in ‘betting-type’ situations — we have an intuitive way of ascertaining them.</p><p>Upon finding an agent’s degrees of belief, point (B) can follow naturally; one can apply the criteria of coherence to determine whether those beliefs should be considered formally ‘admissible’. Yet, the relevance of this normative aspect leaves more to be said.</p><p>Suppose we are now convinced degrees of belief have something to do with probability. Nevertheless, is it <em>applicable</em> to provide an interpretation of this concept — one that we use so effortlessly — if we refrain from connecting it with beliefs of real agents? In other words, can an interpretation in a normative framework serve as <em>a good guide</em>? Consider the counterfactual scenario of interpreting statements of probability through heuristics and biases of real agents that fail to follow a formal set of axioms. This would render much of communication and reasonable inference extremely difficult in natural language. A claim of probable credence in a proposition would not allow you to infer that this agent thinks that its negation is improbable. To express a generalized probabilistic notion would entail spelling out an entire probability distribution, including conjunctions of events. A non-descriptive interpretation certainly has the weakness that it cannot always give us a description of what an agent <em>means</em> by a probability claim (she might be using another metric, such as ‘representativeness’); however, assuming and enforcing a sense of rationality seems to be the only choice we have in interpreting the probability statements of other actors.</p><p>The value in a normative framework also helps individuals sort out inconsistencies in their own partial belief sets. In this sense, the normative interpretation of probability is similar to a normative interpretation of the axioms of logic. Real agents form beliefs that violate the axioms of propositional logic: our beliefs might not commute, we might have full belief in contradictions, or we might not follow the standard inference rules of transitivity or modus ponens. Thinking of the <em>belief </em>function (analogous to the <em>probability </em>function) as an instantiation of the axioms of logic is not meant to describe our real beliefs since we are not deductively closed. However, consistency of our full beliefs is still an epistemic virtue and we do not want to be caught having full belief in <em>p</em> and<em> ~p.</em> This is illustrated by contention in the field surrounding the lottery paradox, which is problematic because it allows a rational agent to have a set of beliefs that are internally inconsistent. As Ramsey argues, interpreting probability in light of a rational agent is nothing but an extension of this consistency constraint for full beliefs: if we have equal credence in <em>p</em> and <em>~p</em> at 90%, we ought to feel uncomfortable and adjust our credences to resolve this (see also Savage 20). While probabilistic coherence does not tell us how to <em>adjust</em> our partial beliefs, neither does logic. However, logic does have the advantage of advocating that rational agents believe truths (not just <em>a priori</em> truths or tautologies). I will only note here that there are various attempts at providing an analog for partial beliefs, including ‘calibration’, which asks our partial beliefs to track relative frequencies. Lastly, establishing a ‘criteria of wrongness’ is important for an interpretation, and the normative framework does this in a way that a purely operational and descriptive one cannot. As discussed by Savion, there are infamous examples of ‘clinging to discredited beliefs’ where agents have stronger belief in propositions after seeing evidence to the contrary. It is only by appealing to to a sense of <em>rationality</em> (though this may require a more thorough Bayesian framework of updating) can we make sense of our intuitions as to why we should consider these agents problematic.</p><p>Even having established that a formal axiomatization is useful, it might still be objected that our normative criteria is mistaken: why should we think that the <em>specific</em> sense of rationality advocated by the dutch book arguments should influence our everyday probability concept? In a normative framework where we admit idealization, we should not take the dutch book arguments in a ‘literal-minded’ way. Taken this way, the lack of a physical bookie to make bets against us (and all the artificiality accompanying a two-person interaction) might be sufficient reason to reject <em>S</em>’s normative suggestion about our epistemic states. Christensen has forcefully argued exactly this:</p><blockquote>“Dutch Book vulnerability is not a real practical liability […] [and] it would not obviously follow that beliefs were defective from the <strong>epistemic</strong> standpoint” (Christensen 1996, 2; emphasis not mine).</blockquote><p>Instead, Christensen posits the following ‘de-pragmatized’ reasoning for defending the dutch book:</p><blockquote><strong><em>J</em></strong>: A degree of belief in <em>p</em> justifies certain betting odds on <em>p</em>.</blockquote><p>Christensen uses <strong><em>J</em></strong><em> </em>to support the following explicit argument, similar to Hajék’s notion of susceptibility:</p><p>1. Suppose <em>A</em> has some betting odds on <em>p</em> where it is possible to inflict a sure loss on <em>A.</em></p><p>2. It follows that these betting odds are defective in nature since they allow a sure loss.</p><p>3. If we take <strong><em>J </em></strong>to be true<strong>, </strong>the odds are <em>justified</em> by beliefs about <em>p.</em></p><p>4. It follows that these beliefs are mistaken.</p><p>This entire argument is meant to be <em>a priori </em>rejection of a belief set — we need not imagine a real bookie or a specific type of real-world scenario, and yet we can still conclude that <em>A</em>’s partial beliefs are epistemically ‘wrong’ in the same way we would if <em>A</em> were deductively inconsistent (Ibid., 7). This argument is a particularly compelling reason to take the normative view seriously, because we are able to separate our intuitions of rationality from the axioms without introducing a practical situation where one loses money. Agents who have no idea what the axioms are can still appreciate the <em>a priori</em> force of the rationality constraint (especially if they buy <strong><em>J</em></strong>).</p><h4><strong>Conclusion</strong></h4><p>Some have taken the lack of rational and coherent agents as an obvious way to undermine the subjective interpretation of probability. Here, I have argued that this line of thought loses its force if we think of the interpretation in a normative framework. Normatively, the interpretation is admissible and is thoroughly applicable. Lastly, I have put forth Christensen’s arguments to show that the normative aspect of the interpretation is a reasonable constraint despite the ‘artificial’ scenarios where it would lead to negative consequences. Normative interpretations of concepts abound in all of philosophy. After all, we find a normative theory of ethics incredibly useful (there are no perfectly virtuous agents), and normative models of game theoretic and economic behavior tremendously applicable (despite a lack of ideal economic actors). We should not shy away from a normative interpretation of probability.</p><p><strong>References</strong></p><p>Armendt, Brad. “Dutch Books, Additivity, and Utility Theory.” <em>Philosophical Topics</em> 21.1 (1993): 1–20. Web.</p><p>Christensen, David. “Dutch-Book Arguments Depragmatized: Epistemic Consistency For Partial Believers.” <em>Journal of Philosophy</em> 93.9 (1996): 450–79. Web.</p><p>Christensen, David Phiroze. “2.” <em>Putting Logic in Its Place: Formal Constraints on Rational Belief</em>. Oxford: Clarendon, 2004. N. pag. Print.</p><p>Eriksson, Lina. “What Are Degrees of Belief?” <em>Studia Logica: An International Journal for Symbolic Logic</em> 86.2, Formal Epistemology I (2007): 183–213. <em>JSTOR</em>. Web. 09 Dec. 2016.</p><p>Grune-Yanoff, Till. “Rational Choice Theory and Bounded Rationality.” <em>Religion, Economy, and Cooperation Religion and Reason</em> (2010): 61–82. Web.</p><p>Hajek, Alan. “Dutch Book Arguments *.” <em>The Handbook of Rational and Social Choice</em> (2009): 173–95. Web.</p><p>Hájek, Alan. “Interpretations of Probability.” <em>Stanford Encyclopedia of Philosophy</em>. Stanford University, 21 Oct. 2002. Web. 09 Dec. 2016.</p><p>Savage, Leonard J. <em>The Foundations of Statistics</em>. New York: Dover Publications, 1972. Print.</p><p>Savion, Leah. “Clinging to Discredited Theories.” <em>The International Journal of Learning: Annual Review</em> 16.2 (2009): 85–94. Web.</p><p>Talbott, William. “Bayesian Epistemology.” <em>Stanford Encyclopedia of Philosophy</em>. Stanford University, 12 July 2001. Web. 09 Dec. 2016.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4202442d6fea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ignoring the diagnosis]]></title>
            <link>https://medium.com/@kshithappens/ignoring-the-diagnosis-4aa27136e667?source=rss-881048cc8b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/4aa27136e667</guid>
            <category><![CDATA[medicine]]></category>
            <category><![CDATA[philosophy]]></category>
            <dc:creator><![CDATA[Kshitij Grover]]></dc:creator>
            <pubDate>Wed, 07 Dec 2016 23:31:17 GMT</pubDate>
            <atom:updated>2016-12-07T23:31:17.689Z</atom:updated>
            <content:encoded><![CDATA[<h4>12/07/16</h4><h4><strong>Introducing the Example</strong></h4><p>In this essay, I will consider an ethical problem regarding the doctor-patient relationship that has far reaching practical implications. Let’s take the following abbreviated example as a guide to our discussion:</p><blockquote><strong>Q</strong>: <em>A 49-year old individual </em><strong><em>(S</em></strong><em>) has voluntarily chosen to see a neurologist at the recommendation of her internist, but refuses to learn of the subsequent diagnosis. In fact, the diagnosis — which her internist knows — is positive for Pick’s disease</em><a href="#_ftn1"><strong><em>[1]</em></strong></a><em>.</em> <em>Should the internist inform </em><strong><em>S </em></strong><em>of the diagnosis?</em></blockquote><p>We might not have strong or pressing intuitions one way or the other about <strong>Q — </strong>but this makes it perhaps more important that we should construct some criterion for how a doctor who faces this situation should react. I will not explicitly address (i) what responsibilities immediately fall on the family members of <strong>S</strong>, and (ii) how confidentiality of the information should bear on the doctor’s decision making. There are two immediate questions I want to pursue here:</p><p>1. What are the moral <em>obligations</em> of the internist?</p><p>2. What is within the scope of moral <em>permissibility </em>for the internist, and what epistemic problems arise in real-world, nuanced situations?</p><p>In order to establish a proper review of these questions, I will address this from the standpoint of <em>paternalism vs. patient autonomy</em>. I will first outline the general arguments before focusing on how they inform the answers to (1) and (2).</p><h3><strong>Paternalism and Patient Autonomy</strong></h3><p>As this example is not representative of the typical debates in this field, we will turn to the usual arguments first in order to get a good grip of the complexities in <strong>Q</strong>. In the ethics of health care and specific diagnoses, the conflict is usually framed as a tension between <em>paternalism</em> and <em>patient autonomy</em>.</p><p>Paternalism is the idea that the doctor’s chief basis for action comes from an overriding responsibility to medically benefit the patient, even against the patient’s active consent. A doctor acts paternalistically by doing <em>X</em> when <em>X</em> takes away a liberty the patient regularly has, but the goal of <em>X</em> is to promote the patient’s well being. Though paternalism might sound like a harsh philosophy when put so starkly, we take it for granted in other domains of life. For example, enforced road safety measures and parents’ treatments of children are ordinary and well-accepted examples of the principle. It is also interesting (but perhaps not ethically informative) that the Hippocratic Oath along with orthodox cultural views of medicine do not contain any reference to honoring patient consent (or even telling the truth to patients)<a href="#_ftn2">[2]</a>. Rather, the Hippocratic slogan “do no harm” might quite correctly be interpreted to be in line with a paternalism-guided view of medical practice. A compelling reason in favor of paternalism is that doctors attend medical school for years and have much richer understanding and experience, whereas it might be impossible to impart that medical knowledge (or even basic understanding of probability, false positives, testing procedures, etc.) to a patient. Proponents of paternalism, whether guided by an underlying notion of utility or otherwise, will be comfortable in some situations with not being honest with the patient.</p><p>The other opinion (though of course still intending the benefit of the patient) in the debate is that doctors should always respect the autonomy of the patient, first formalized as a burden of the physician in the work of Beauchamp and Childress. Autonomy is closely tied with ‘truth-telling’. In the vast majority of cases, doctors preserve patient autonomy by not making independent judgments about treatment decisions. The foundation of the principle of autonomy can be traced back to Mill’s conception of ‘liberty’: in <em>On Liberty</em>, Mill argues that</p><blockquote>‘the only purpose for which power can be rightfully exercised over any member of a civilized community, against his will, is to prevent harm to others’ (621).</blockquote><p>This requires that doctors respect the ‘personal right’ — in most cases where the patient does not pose a threat to others — of the individual to come to her own decisions without any influences that constrain that freedom. In the health care debate, this is usually a matter of giving the patient relevant information regarding the diagnosis in an understandable way.</p><p>Generally applied, both paternalism and autonomy face numerous objections. Paternalism ostensibly has an air of dominance and arrogance, but more importantly can conflate medical expertise with <em>moral</em> expertise or falsely anticipate the knowledge of complex preferences. Gillon argues that doctors who act paternalistically and deceive (or do not consult) patients in the name of beneficence will have an extremely hard time judging the overall extent to which the information might interplay with the patient’s life. Sound medical advice should not be confused with universal advice without an intimate understanding of the relevant factors that only the patient can have. On the other hand, others have argued that paternalism can be justified on the grounds that it is more humane: patients often react poorly to grave diagnoses. Collins takes an even stronger stance, arguing that the overall happiness and productivity of patients’ lives may <em>depend</em> on lying unless we can determine diagnoses and options without imprecision.</p><p>It is important here to note that <strong>Q</strong> is a different scenario than in the framework above. Whereas in most cases honoring autonomy implies truth-telling and paternalism implies proceeding without full consent, honoring the patient’s autonomy in <strong>Q</strong> will require the internist to withhold the diagnosis. The above principles should nevertheless inform our assessment of <strong>Q</strong>. In this case, they suggest two important questions:</p><p>A. If patient autonomy promotes the idea that <strong><em>S</em></strong> is better equipped to make treatment and general ‘life’ decisions with all the relevant information, how can we reconcile this with <strong><em>S</em></strong> <em>rejecting</em> this information in the ‘first-order decision’<a href="#_ftn3">[3]</a> of learning the diagnosis? In other words, what qualifies a desire as <em>autonomous</em>?</p><p>B. Paternalism (and the overwhelming responsibility to the good of <em>S</em>) will dictate that the internist tell <em>S</em> the truth for her own long-term good. Is this a morally justifiable route?</p><p>I will treat (A) and (B) separately in the following sections; (A) will lead to definite progress on the question of moral obligations, whereas (B) will address (2) above.</p><h3><strong>(A) The First Order Decision</strong></h3><p>The decision I want to consider in this section is <em>S</em>’s refusal to learn the diagnosis (hence “first order”). In the previous section, we established some arguments for why the doctor might be principally obliged to respect this wish as a consequence of the right of personal autonomy. However, since respecting this decision will lead to limiting life-sustaining treatment in <strong>Q</strong>, we should consider Savalescu’s arguments that characterize situations when such a right is <em>genuinely</em> protected (and perhaps when it ought not be). Savalescu argues that we should not be under obligations to honor a patient’s desires unless they are <em>rational</em>. This <em>rationality</em> requirement is close to what other authors have termed ‘decision making capacity’, and presents the following constraints<a href="#_ftn4">[4]</a>:</p><p><strong>C1.</strong><em> S</em> has the facts that are required to make the decision.</p><p><strong>C2. </strong><em>S</em> has the logical capacity to evaluate the facts.</p><p><strong>C3. </strong><em>S </em>can ‘vividly’ imagine the possible outcomes of her decision.</p><p>I want to apply these constraints not to a treatment decision about Pick’s disease, but rather her decision about the diagnosis (in particular, the <em>facts</em> in C1 need not concern Pick’s at all). Each of these constraints seems to be well-justified by taking examples to the contrary. Moreover, I will demonstrate that violating any of these three constraints is self-defeating to the decision <em>D</em> whose autonomy we want to uphold:</p><p><strong>C1.</strong> Suppose <em>S</em> is misinformed about the facts of the matter, and believes that knowing the diagnosis will cause her family to abandon her or that the diagnosis will legally bind her to treatment (false). In this case, <em>S</em> is not making the relevant decision, but rather a different decision <em>D’</em> concerning separate outcomes and implications.</p><p><strong>C2</strong>. Suppose <em>S</em> is somehow logically inconsistent internally: she believes that the diagnosis will give her a better sense of her future’s timeline, and expects no negative consequences. Yet, from these premises, she still concludes some subjective harm from learning the diagnosis. It is clear that the decision <em>D</em>, if arrived at without proper reasoning, is not a decision at all but a simple belief (and it would certainly be a larger burden on the proponent of autonomy to honor <em>all beliefs</em> rather than autonomous <em>decisions</em>).</p><p><strong>C3</strong>. If <em>S</em> cannot imagine the outcome of knowing the diagnosis, then we are left at a point where the guiding notion of autonomy is violated. Proponents of autonomy depend on an element of planning for self over time. We lose this if proper imagination of the outcomes is lacking, because without being able to imagine <em>herself</em> knowing or not knowing the diagnosis, <strong><em>S</em></strong> cannot make a life plan.</p><p>Savalescu’s elements of capacity can be refuted on the basis that they are (i) practically and epistemically too demanding for the internist and (ii) are too stringent, even in principle.</p><p>While I think (i) is certainly true and perhaps an unfortunate consequence of these difficult situations, it should not be construed to absolve the doctor of the responsibility. Rather, we should take it as a reason to <em>train</em> doctors not only in their relevant medical expertise, but also with an ability to communicate facts and develop a doctor-patient relationship over time that leads to an understanding of the patient’s intellectual abilities and values. To avoid trivializing the endeavor (which I believe lies in the domain of psychology)<a href="#_ftn5">[5]</a>, I will only repeat Applebaum’s suggestion that we ask patients to restate the information and their role in the decision process, work with them to spell out their logic, and take help from individuals close to them to understand their imaginative state.</p><p>I think (ii) presents a stronger case against holding these evaluative criteria for decision making capacity. In particular, requiring rationality as in <strong>C2</strong> might disqualify most decisions we normally make from being <em>autonomous</em>. Humans by nature have finite reasoning powers. Even if we believe some set of propositions, it’s quite likely that we will not immediately believe a sufficiently long tautology or logical entailment of our beliefs. As behavioral research by Kahneman, Tversky, and others has repeatedly shown, it is not that our judgments are simply mistakes around a rational basis — even in explicit questions, we display systematic biases and irrationalities. Though this conclusion might sound catastrophic for Savalescu, I think abandoning the criteria would be overreaching. Not being able to explicitly spell out a proper sense of ‘rationality’ should only motivate the thought that a <em>uniform</em> psychological test for <em>rational beliefs</em> will escape us; as Freedman does, we can still establish very basic criteria and then rely on a case-by-case assessment.</p><p>Perhaps the most important thing to keep in mind for any assessment of decision making capacity is that disagreement from medical counsel alone (“<em>S</em>, it is my professional opinion that you should learn the diagnosis”) <em>should not</em> imply irrationality.</p><p>I want to briefly discuss how this first-order-decision is related to the second-order decision. Clearly, if <em>S</em> autonomously decides to reject the diagnosis, we can assume that this inherently implies a decision about (lack of) treatment, which is then not autonomous because it does not satisfy <strong>C1-C3. </strong>We might claim that the second decision about the treatment of (and <em>S’</em>s reaction to) her diagnosis of Pick’s disease is more important than the first order decision, and so honoring the first decision is morally reprehensible. Without some moral principle to justify why either decision is more pressing, this argument fails to do justice to the above criteria for the first-order decision. If we are to accept that the first decision is autonomous, the patient can genuinely imagine what it means to not know the diagnosis. There might be values, or non-descriptive beliefs that cause <em>S</em> to reject learning of the diagnosis. The second order decision should then inherit the status of autonomy from the first.</p><p>The attempt to elevate the second decision’s priority is nevertheless forceful; this requires us to revisit our notions of paternalism in a more nuanced way to address <strong>(B).</strong></p><h3><strong>(B) Paternalism, revisited</strong></h3><p>Though I have presented paternalism in the second section as a unified concept, the stance is not so simple. For Mill and Kant, autonomy is not simply a right but a <em>moral imperative</em> or duty — as a consequence, an individual is not ‘free’ to give up her right to autonomy. Therefore, it seems that Mill would condone paternalism under the pretense that the long-term autonomy of <em>S</em> is impaired by the honoring <em>S</em>’s short-term autonomy for the diagnosis. Mill explains that allowing such decisions would be self defeating:</p><blockquote>“[she] therefore defeats, in [her] own case, the very purpose which is the justification of allowing [her] to dispose of [herself]… the principle of freedom cannot require that [s]he should be free to not be free”</blockquote><p>Framed this way, (weak) paternalism might be the only way that the internist can truly support <em>S</em>’s autonomy by informing her of the diagnosis.</p><h3><strong>Conclusion and Recommendations</strong></h3><p>In light of the above discussion, I propose that the internist:</p><p>a) Has the moral <em>obligation</em> to assess the capacity of the first order decision. Decision making capacity, especially in the case of a possible instance of neurodegeneration, will play a central role in determining the autonomy of the decision and establishing whether the desire is <em>rational</em>.</p><p>b) Is morally <em>justified</em> in being paternalistic if she can properly demonstrate that the first order decision is not autonomous or on the normative basis of weak paternalism as put forth by Mill. In either case, the moral justification should stem from a stance that intends to uphold the autonomy of the patient.</p><p>These questions often do not lend straightforward answers, and my approach here has been inevitably incomplete. I have not looked at the case from a <em>deontological </em>vs. <em>consequentialist</em> stance, and I certainly have not factored in any empirical extrapolations of whether it is reasonable for <em>S</em> to reject the diagnosis. No philosophical moral principle or obligation can address the inherent intricacies of any real-world situation, and it is the burden to act most responsibly under difficult circumstances that the doctor must bear.</p><p><a href="#_ftnref1">[1]</a> A neurodegenerative disorder similar to Alzheimer’s. I will assume that this is terminal, but has some course of therapy or management that is ‘life-sustaining’ in a broad sense.</p><p><a href="#_ftnref2">[2]</a> Marzanski (2000) points out that ‘purity and holiness’ (or more generally virtue) as stated in the Hippocratic oath may imply veracity. Nevertheless, the point remains that the oath is at least conflicted in its guidance.</p><p><a href="#_ftnref3">[3]</a> From S’s viewpoint, we should differentiate the <em>first order decision</em> to be whether S should learn the diagnosis, and the <em>second order decision</em> regarding treatment of Pick’s disease.</p><p><a href="#_ftnref4">[4]</a> Other authors have included even more criteria, such as the existence of specific values and an ability to express choice. See Buchanan &amp; Brock 1989.</p><p><a href="#_ftnref5">[5]</a> It should be noted that while the underlying theory may be controversial, there are empirical tests for decision making capacity. For a short sample, see Etchells, 1999; Markson 1994; Applebaum 1988.</p><h3><strong>References</strong></h3><p>Appelbaum, Paul S., and Thomas Grisso. “Assessing Patients’ Capacities to Consent to Treatment.” <em>The New England Journal of Medicine.</em> U.S. National Library of Medicine, n.d. Web. 05 Dec. 2016.</p><p>Charland, Louis C. “Decision-Making Capacity.” <em>Stanford Encyclopedia of Philosophy</em>. Stanford University, 15 Jan. 2008. Web. 05 Dec. 2016.</p><p>Collins, Joseph, and Helga Kuhse. “Should Doctors Tell the Truth?” <em>Bioethics</em>. Ed. Peter Singer. 2nd ed. N.p.: Blackwell, n.d. 605–10. Print.</p><p>Drickamer, and Lachs. “Should Patients with Alzheimer’s Disease Be Told Their Diagnosis? — NEJM.” <em>New England Journal of Medicine</em>. N.p., n.d. Web. 05 Dec. 2016.</p><p>Dworkin, Gerald. “Paternalism.” <em>Stanford Encyclopedia of Philosophy</em>. Stanford University, 06 Nov. 2002. Web. 05 Dec. 2016.</p><p>Elliott, Carl. “Amputees by Choice.” <em>Bioethics</em>. Ed. Peter Singer and Helga Kuhse. 2nd ed. N.p.: Blackwell, n.d. 625–33. Print.</p><p>Entwistle, Vikki A., Stacy M. Carter, Alan Cribb, and Kirsten Mccaffery. “Supporting Patient Autonomy: The Importance of Clinician-patient Relationships.” <em>Journal of General Internal Medicine</em> 25.7 (2010): 741–45. Web.</p><p>Etchells, Edward, Peteris Darzins, Michel Silberfeld, Peter A. Singer, Julia Mckenny, Gary Naglie, Mark Katz, Gordon H. Guyatt, D. William Molloy, and David Strang. “Assessment of Patient Capacity to Consent to Treatment.” <em>Journal of General Internal Medicine</em> 14.1 (1999): 27–34. Web.</p><p>Gillon, R. “Paternalism and Medical Ethics.” <em>Bmj</em> 290.6486 (1985): 1971–972. Web.</p><p>Hermann, Helena, Manuel Trachsel, Bernice S. Elger, and Nikola Biller-Andorno. “Emotion and Value in the Evaluation of Medical Decision-Making Capacity: A Narrative Review of Arguments.” <em>Frontiers in Psychology</em> 7 (2016): n. pag. Web.</p><p>Higgs, Roger. “On Telling Patients the Truth.” <em>Bioethics</em>. Ed. Peter Singer and Helga Kuhse. 2nd ed. N.p.: Blackwell, n.d. 611–15. Print.</p><p>Jackson, J. “Telling the Truth.” <em>Journal of Medical Ethics</em> 17.1 (1991): 5–9. Web.</p><p>Kant, Immanuel. “On a Supposed Right to Lie from Altruistic Motives.” Ed. Helga Kuhse. <em>Bioethics</em>. Ed. Peter Singer. 2nd ed. N.p.: Blackwell, n.d. 603–04. Print.</p><p>Marzanski, M. “Would You like to Know What Is Wrong with You? On Telling the Truth to Patients with Dementia.” <em>Journal of Medical Ethics</em> 26.2 (2000): 108–13. Web.</p><p>Mill, John Stuart. “Chapter 5: Applications.” <em>On Liberty</em>. New York: Norton, 1975. N. pag. Print.</p><p>Murgic, Lucija, Philip C. HÃ©bert, Slavica Sovic, and Gordana Pavlekovic. “Paternalism and Autonomy: Views of Patients and Providers in a Transitional (post-communist) Country.” <em>BMC Medical Ethics</em> 16.1 (2015): n. pag. Web.</p><p>Savulescu, Julian. “Rational Desires and the Limitation of Life Sustaining Treatment.” <em>Bioethics</em>. Ed. Peter Singer and Helga Kuhse. 2nd ed. N.p.: Blackwell, n.d. 646–63. Print.</p><p>Veatch, Robert. “Abandoning Informed Consent.” <em>Bioethics</em>. Ed. Peter Singer and Helga Kuhse. 2nd ed. N.p.: Blackwell, n.d. 636–45. Print.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4aa27136e667" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On Sex Selective Abortion]]></title>
            <link>https://medium.com/@kshithappens/on-sex-selective-abortion-1f5c750bdd73?source=rss-881048cc8b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f5c750bdd73</guid>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[abortion]]></category>
            <dc:creator><![CDATA[Kshitij Grover]]></dc:creator>
            <pubDate>Wed, 16 Nov 2016 19:14:42 GMT</pubDate>
            <atom:updated>2016-11-24T20:24:08.699Z</atom:updated>
            <content:encoded><![CDATA[<p><em>11/06/16</em></p><h4><strong>Assumptions and Argument</strong></h4><p>In this paper, I want to consider the topic of sex-selective abortion (SSA), and how it relates to abortion on the basis of a genetic disability (DBA). We seem to <em>prima facie </em>accept the following two propositions:</p><p><strong>(1*)</strong> Abortion on the basis of a disability (e.g. down’s syndrome) is morally permissible.</p><p><strong>(2*)</strong> Abortion based on the sex of the fetus is morally impermissible, or unjust.</p><p>I will primarily argue for what I call the <em>consistent</em> stance: there is no morally relevant difference between SSA and DBA. In particular, the consistent stance holds that we should hold equivalent <em>evaluative criteria</em> for SSA and DBA. Note that the consistent stance <em>does not</em> imply a normative attitude about the ‘average’ case of SSA or DBA in a specific society, but rather states that there is nothing <em>in principle </em>(i.e. inherently) morally different about the two policies. I will also attempt to advance the secondary argument that most cases of DBA and SSA are indeed morally permissible.</p><h4><strong>Diagnosing the difference</strong></h4><p>Let’s begin by considering perhaps the most emotionally forceful argument to think that SSA is by nature distinct from DBA: it is often asserted that <strong>(2*)</strong> follows obviously from an unjust and inherent prejudice against a sex, whereas <strong>(1*) </strong>does not derive from any such prejudice. I imagine that the argument, which I will term the <em>charge of sexism</em>, goes like this:</p><p>1. Discrimination on the sole basis of sex (sexism) is morally impermissible.</p><p>2. Aborting a fetus based on its sex (SSA), determined through prenatal testing, is motivated by sexism on the part of the parents.</p><p>3. SSA is morally impermissible.</p><p>I would first like to point out that we can conclude (3) directly by this argument only if (2) is strengthened to say that SSA is motivated <em>only</em> by sexism<a href="#_ftn1">[1]</a>. I accept the first premise, but not without concern. Normally, we think that sexism is wrong (at least in part) because there are persons who are negatively affected by the belief, or whose rights are violated. This is not obvious here: whether the fetus is a person who has rights is a contentious topic in the abortion debate, and something I return to later in this essay<a href="#_ftn2">[2]</a>. It is not clear that our intuitions of ‘unfairness’ and ‘oppression’ should give the same weight as usual. To assess the applicability, consider Parfit’s classic examples of possible people<a href="#_ftn3">[3]</a>. If a couple chooses to use contraception on the notion that there is a 50% chance of having a female child, does the <em>charge of sexism</em> subject them to the same moral judgment? Do we feel they are sexist to the possible person they might have conceived? If you think there is some reason to be less harsh, then I suggest that your objection does not entirely stem from the <em>charge of sexism</em>, but rather objections to abortion as a practice. Yet, to give credit to the proponent of the charge of sexism, I admit that we can defend (1) by looking at the issue in a Kantian sense. We could not make sexism a <em>maxim</em> and still expect a functioning society. Let’s now move to the more problematic premise: (2) seems to simply be a false assumption in most instances of SSA. We will consider plenty of cases in which SSA can be justified by genuine concerns of suffering or preferences of the parents.</p><p>But the question remains: what are we to think of abortion which is carried out merely due to the sex of the fetus (i.e. genuine sexism)? Here, I will be willing to bite the bullet and concede that this alone does not form proper grounds for abortion. However, I propose that this is no different from the case of DBA. If we frame the analogous argument for DBA, it would imply that aborting for the <em>mere reason</em> of a fetus having a disability is wrong. Surely, any serious defender of <strong>(1*) </strong>would agree that aborting a fetus likely to develop myopia — <em>justified purely because the fetus is disabled</em> — is not morally sufficient<a href="#_ftn4">[4]</a>. My point, then, is that in the case of disability, we tend to assume underlying moral reasons ‘for free’: the degraded quality of life, the suffering, and so on. Just because we cannot make these intuitive jumps for SSA should not cloud our judgment when evaluating SSA — and we certainly should not assume that SSA can only be motivated by sexism. The couple who appeals <em>only</em> to the sex of the fetus will share the same moral position as the couple who appeals <em>only</em> to the fact that the fetus is disabled (in both cases, we may reasonably ask for some morally relevant account of why the sex or disability allows for abortion). The charge of sexism does not undermine the consistent stance.</p><p>A second argument that is often used to defend <strong>(2*) </strong>is that the sex being selected against — regardless of what reasons the parents might have — is degraded and thus this practice perpetuates sexual inequity in society. Note that this is distinct from the <em>charge of sexism</em>: this argument describes a net detriment to others in society, and applies more broadly even when the parents have morally ‘defensible’ reasons. I would like to note that this type of argument is also extremely common in the literature of DBA, giving the consistent stance some plausibility<a href="#_ftn5">[5]</a>. This argument (termed the <em>expressivist </em>argument) can be generalized to the following points:</p><p>1. Abortion on the basis of trait <em>x</em> wrongly minimizes a fetus (or perhaps the individual that will develop from the fetus) to a representation of only <em>x</em>.</p><p>2. By allowing abortions of this type, we are sending ‘hurtful’ or ‘discriminatory’ messages to persons in society with trait <em>x</em>.</p><p>Note that my primary burden here is to defend the idea that the above points hold no special weight whether <em>x</em> is the sex of the fetus or a disability diagnosis. It might be thought that a characteristic like sex <em>cannot </em>be inherently harmful to an individual or entirely determine her life trajectory, whereas a disability will often cause intense suffering and limit the opportunities available to the individual. If this were true, then point (1) would only be an ‘unfair’ representation in the case of SSA and not DBA. Such a notion comes from a presumptive attitude that lacks proper justification. Imagine a society where females are systematically oppressed, given few opportunities for social mobility, and do not possess any of the basic rights of expression, representation, and so on. A woman’s life in this society is limited by her sex as much as (if not more) than a disabled child is limited by a disability. You need not buy my specific description (for example, you might require that the sex of the individual significantly limit lifespan as in the case of disability): my point is only that there is nothing intrinsic about a disability that allows it to bypass point (1) of the expressivist argument whereas sex cannot. The reply I anticipate here is that a disability such as down’s syndrome is an <em>absolute</em> bad whereas sex-based disadvantages are a result of social prejudices that can be resolved<a href="#_ftn6">[6]</a>. As Asch argues, this is an ill-informed view on the part of the ethicist. Individuals with serious disabilities go through life quite happily and think of their own lives as rich and rewarding. If anything, it is others’ attitudes and the lack of societal support that causes the vast majority of reported dissatisfaction<a href="#_ftn7">[7]</a>. I want to return to myopia: in this case, we no longer even have the pressing intuition that this is a disability because society is extremely well-equipped with prescriptive eyewear. Such an account of disability as a social paradigm, much like sex prejudice, should motivate the idea that the expressivist argument against abortion holds equal force for both cases if it holds at all. This is sufficient to salvage the consistent stance.</p><p>I want to put forth some reasons to reject the expressivist account outright: James Nelson, Edwards, and various others have argued strongly here<a href="#_ftn8">[8]</a>, so I will only give a brisk rehearsal to make my point. A core tenet of the expressivist is that each fetus is more than just <em>x </em>(where<em> x</em> is the sex or the disability). Therefore we should treat their birth and life in the full, proper context. The expressivist is caught in a self-defeating stance, as precisely this idea refutes point (2): each family will have different reasons why trait <em>x</em> bears on their situation. To put the point extremely, if <em>x</em> is the property of being the fourth child, surely aborting that child does not signal to other fourth children that their lives are any less valuable<a href="#_ftn9">[9]</a>. Similarly, it is unfair to characterize a family that already has a disabled first child but aborts another fetus prenatally diagnosed with down’s syndrome as expressing any sort of discriminatory attitudes or less love for the first child. Aborting a girl because of past parental trauma involving their last child does not undermine the womanhood of existing persons. I think Savulescu puts this point most clearly when he says that SSA (and, equally DBA) takes action against the trait because of its effects on well-being, but refuses to make value judgments about individuals with <em>x</em><a href="#_ftn10">[10]</a>.</p><p>The last major argument I want to briefly address is the <em>eugenics</em> argument: it is supposed that SSA is a significant step towards selective ‘cleansing’ and control over future generations whereas DBA is not. I think a defense of this follows naturally from our discussion above. Proponents of the eugenics stance fail to bear the burden of proof: in what morally relevant sense is sex a characteristic that is more trivial than a disability? I have already argued above that SSA does not have to stem from inconsiderate or offhand reasons, and I have aimed to show in a rebuttal of the expressivist stance that SSA does not imply value judgments about the opposing sex. We cannot draw the notion of ‘systematic cleansing’ from an individual woman exercising her right to reproductive choice. Moreover, an important component of eugenics requires that it is institutionalized or at least coordinated; in the cases relevant to our present discussion, neither SSA nor DBA meet this requirement.</p><h4><strong>The Permissibility of Abortion</strong><a href="#_ftn11"><strong>[11]</strong></a></h4><p>In this section, I want to offer the viewpoint of Tooley to strengthen the case I have already made in defense of SSA and DBA. These arguments are more general, so I will not address SSA and DBA separately.</p><p>Tooley’s stance is well-known as an argument about <em>personhood</em><a href="#_ftn12"><strong><em>[12]</em></strong></a>. To appreciate his view, we should start from the most basic conservative stance on abortion that Tooley wants to analyze:</p><p>1. Killing an innocent human being is wrong.</p><p>2. A fetus is innocent.</p><p>3. Killing a fetus is wrong.</p><p>Tooley claims that the use of ‘human being’ in the first premise deserves clarification. Surely, it cannot be <em>homo sapiens</em> as that would unjustifiably give special status to our species (and is thereby speciesist). Rather, he claims that humans are thought to have some right to life because of their status as <em>persons</em>. Tooley makes the case that a <em>person</em> is someone who has a sense of self-identity lasting over time (“self consciousness”). Moreover, we cannot take away this right from a being that does not have the desire (or conception) of this kind of consciousness. Using this vein of argument, Tooley justifies abortion (and, in fact, infanticide) by saying that a fetus is not mentally developed enough to desire a continued existence as one being over time, and is thereby not a <em>person</em>. Thus, killing a fetus is not wrong, and both SSA and DBA can be justified (whether or not the fetus grows up to <em>become</em> a person).</p><p>Disagreement with Tooley generally hinges on the potentiality principle. Since a fetus will (in the normal course of events) grow to become a <em>person</em> with a sense of sustained identity and thus rights, a defender of a fetus’ right to life will claim that it is morally wrong to abort. Though Tooley himself gives an analogy in an attempt to salvage his account, I find the arguments of Singer and Parfit more compelling as they come with less substantive assumptions<a href="#_ftn13">[13]</a>. In particular, Singer argues against the potential person intuition from two angles<a href="#_ftn14">[14]</a>:</p><p>(1) It is not obvious that we should accept as a rule that a potential <em>x</em> has the same rights as an <em>x</em>. To give my own analogy, an heir to the king does not have the same rights as the king himself.</p><p>(2) Suppose we are to take the stance that a potential person constitutes a major loss to society in virtue of their future contributions. This commits us to counterintuitive views: in particular, we must accept that contraception leads to the same sorts of losses, whereas abortions where we instead give birth at another time (hence a 1:1 tradeoff in ‘potential people’) <em>do not</em>.</p><p>It seems, then, that arguing against Tooley on the basis of the potential of a fetus is well-refuted by these considerations.</p><h4><strong>Conclusion</strong></h4><p>In this paper, I have chiefly aimed to defend the following:</p><p><em>Consistent Stance</em>: There is no <em>inherent</em> difference between sex-selective abortion (SSA) and disability-based abortion (DBA).</p><p>I have given reasons to believe that the <em>charge of prejudice (sexism)</em>, the expressivist argument, and the eugenics stance imply the same moral status for both DBA and SSA. More strongly, in each case, I have argued that serious cases of DBA and SSA should be justified. Independently, I have pursued and defended Tooley’s argument in defense of abortion.</p><p>I want to conclude by now assessing our prima facie intuitions if we are to accept the consistent stance (suppose, for the moment, that we are unconvinced of my secondary argument on non-selective abortion’s permissibility). I suggest that the results of this discussion lead us here:</p><p>1. We have no reason to believe, without considering the reasons underlying a case of SSA or DBA, that either will naturally hold a higher moral status than the other.</p><p>However, I want to emphasize that <strong>(1*)</strong> and <strong>(2*)</strong> need not be completely mistaken, especially in western society. It is perfectly possible that <em>in principle</em> SSA and DBA share the moral status while still holding that there might be fewer cases of SSA in a society where we can meet this uniform moral criteria. Yet, we should abandon <em>a priori</em> notions that SSA is somehow inherently worse for society (in that it promotes gender-inequality or eugenics), or that it is necessarily motivated by sexism.</p><p><a href="#_ftnref1">[1]</a> There might be other defensible principles for why SSA is justified, and so (3) will not follow from (1) and (2) alone.</p><p><a href="#_ftnref2">[2]</a> For extended discussion, see arguments from Singer and Tooley.</p><p><a href="#_ftnref3">[3]</a> Parfit Derek. Rights, interests and possible people. In: Singer Peter, Kuhse Helga., editors. Bioethics: An anthology. 2. Oxford: Blackwell; 2006. pp. 108–112.</p><p><a href="#_ftnref4">[4]</a> Of course, we might argue from other angles that abortion is justified in the general case, and so extends to this case: note that these arguments will apply equally well to SSA.</p><p><a href="#_ftnref5">[5]</a> For a fleshed out version of this in relation to the disability debate, see Asch’s <em>Prenatal Diagnosis and Selective Abortion: A Challenge to Practice and Policy</em>; Gonter’s <em>The Expressivist Argument</em>…</p><p><a href="#_ftnref6">[6]</a> Standard argument in this literature; also suggested in conversation by Anonymous</p><p><a href="#_ftnref7">[7]</a> This also a topic in the debate regarding deafness and its position as a disability.</p><p><a href="#_ftnref8">[8]</a> Jeremy Williams in <em>Sex Selective Abortion: A Matter of Choice (2012)</em> also puts forth the argument that infringing on reproductive rights by expecting women to combat societal biases is an unfair allocation of burden. I am not ignorant of these arguments, but have decided not to include them in the discussion here.</p><p><a href="#_ftnref9">[9]</a> James Nelson, <em>Prenatal Diagnosis, Personal Identity, and Disability</em></p><p><a href="#_ftnref10">[10]</a> Savulescu, <em>Procreative Beneficience: Why we should select the best children</em></p><p><a href="#_ftnref11">[11]</a> In the interest of brevity, I only provide one argument here, but I also vigorously defend Thomson’s considerations based on woman’s rights and control of body</p><p><a href="#_ftnref12">[12]</a> Tooley, <em>Abortion and Infanticide </em>(25–38)</p><p><a href="#_ftnref13">[13]</a> For example, Tooley relies on a symmetry argument between action and inaction</p><p><a href="#_ftnref14">[14]</a> Singer (2005), <em>Practical Ethics</em> (157–163)</p><h4>References</h4><p>Asch, Adrienne. <em>Prenatal Diagnosis and Selective Abortion: A Challenge to Practice and Policy</em>. <em>Bioethics</em>. Ed. Peter Singer and Helga Kuhse. 2nd ed. N.p.: Blackwell, n.d. 122–36. Print.</p><p>Edwards, S. D. “Disability, Identity and the “expressivist Objection”” <em>Journal of Medical Ethics</em> 30.4 (2004): 418–20. Web.</p><p>Gonter, Carolyn. “The Expressivist Argument, Prenatal Diagnosis, and Selective Abortion: An Appeal to the Social Construction of Disability.” <em>Macalaster Journal of Philosophy</em> 12.1 (2004): n. pag. Web.</p><p>Kukla, Rebecca. “Pregnancy, Birth, and Medicine.” <em>Stanford Encyclopedia of Philosophy</em>. Stanford University, 17 Feb. 2011. Web. 05 Nov. 2016.</p><p>Marquis, Don. <em>Why Abortion Is Immoral</em>. <em>Bioethics</em>. Ed. Peter Singer and Helga Kuhse. 2nd ed. N.p.: Blackwell, n.d. 51–62. Print.</p><p>Nelson, James Lindemann. “Prenatal Diagnosis, Personal Identity, and Disability.” <em>Kennedy Institute of Ethics Journal</em> 10.3 (2000): 213–28. Web.</p><p>Parfit, Derek. “Rights, Interests, and Possible People.” <em>Bioethics</em>. Ed. Peter Singer and Helga Kuhse. 2nd ed. N.p.: Blackwell, n.d. 108–12. Print.</p><p>Savulescu, Julian. <em>Bioethics</em>. Ed. Peter Singer and Helga Kuhse. 2nd ed. N.p.: Blackwell, n.d. 145–49. Print.</p><p>Savulescu, Julian. “Procreative Beneficence: Why We Should Select the Best Children.” <em>Bioethics</em> 15.5–6 (2001): 413–26. Web.</p><p>Singer, Peter. <em>Practical Ethics</em>. Cambridge: Cambridge UP, 1979. Print.</p><p>Thomson, Judith Jarvis, and Helga Kuhse. <em>A Defense of Abortion</em>. <em>Bioethics</em>. Ed. Peter Singer. 2nd ed. N.p.: Blackwell, n.d. 40–50. Print.</p><p>Tooley, Michael. “Abortion and Infanticide.” <em>Bioethics</em>. Ed. Peter Singer and Helga Kuhse. 2nd ed. N.p.: Blackwell, n.d. 25–38. Print.</p><p>Williams, Jeremy. “Sex-Selective Abortion: A Matter of Choice.” <em>Law and Philosophy</em> 31.2 (2011): 125–59. Web.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f5c750bdd73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Defense of Finite Frequentism]]></title>
            <link>https://medium.com/@kshithappens/a-defense-of-finite-frequentism-ef00250e2caf?source=rss-881048cc8b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef00250e2caf</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[probability]]></category>
            <category><![CDATA[academic-writing]]></category>
            <dc:creator><![CDATA[Kshitij Grover]]></dc:creator>
            <pubDate>Thu, 03 Nov 2016 00:45:11 GMT</pubDate>
            <atom:updated>2016-11-03T00:46:50.964Z</atom:updated>
            <content:encoded><![CDATA[<p>In this essay, I will aim to defend the account of probability known as Finite Frequentism. Finite Frequentism holds that the probability of <em>A</em> is simply the relative frequency of realized occurrences of <em>A </em>with respect to a reference class of repeated or similar events. Let me briefly illustrate this with an example: if we draw a ball from an urn 1000 times, and we observe a red ball 50 times, we assert that the probability of drawing a red ball is 0.05<a href="#_ftn1">[1]</a>. Hajek has argued that the interpretation is simply a non-starter. My goal in this paper is not to explicitly defend the account against all his objections, but rather to illustrate that Finite Frequentism should remain a contender as an interpretation of probability. I will do this by showing that this interpretation is widely applied in the scientific literature, and then showing that we can avoid Hajek’s ‘knockdown’ concerns.</p><p>Before considering any objections, I want to quickly motivate the idea that the account deserves credit insofar as an interpretation of probability<a href="#_ftn2">[2]</a>. One major criterion for a ‘good’ interpretation of probability is its applicability to science. Though finite frequentism may not find much serious support in the philosophical literature, I contend that it is often <em>prima facie</em> taken as the proper notion of probability in scientific studies. Finite frequentism finds favor in science because it has a rather simple epistemic story and favors the empiricist notions that we all share. For example, consider the following passage from a cholesterol study measuring the effects of Simvastatin<a href="#_ftn3">[3]</a>:</p><blockquote><em>The probability that a woman would escape a major coronary event was 77.7% in the placebo group and 85.1% in the simvastatin group[…](Pedersen 1386)</em></blockquote><p>Table 1 shows that this is indeed the number of observed cases out of a decidedly finite reference class, consistent with the finite frequentist interpretation. Not only are statements like this well accepted in science (this paper has been cited well over 7000 times), it is unclear how well another interpretation of probability (Laplacian, degrees of belief, or otherwise) would be able to form the basis for such statements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*N62fPc69H7O6K82fsBzmQw.png" /><figcaption>Table 1</figcaption></figure><p>Having shown that finite frequentism is not obviously mistaken, I want to now argue that Hajek’s arguments can be properly refuted.</p><h4>Reference Class Objections</h4><p>Let me first argue that the reference class primitive is necessary, reasonable and presents ‘issues’ that are not unique to the finite frequentist account. Hajek’s worry is that by taking a reference class as a primitive, we are committing to always talking about probabilities relative to the set of objects in the class. I will bite the bullet here: all probabilities are indeed conditional on <em>some</em> reference class. Take the simplest example of tossing a two-sided coin. If we say that the probability of a heads-up toss is <em>unconditionally</em> ½, our statement is really something of the form <em>P</em>(coin lands heads up | coin is not weighted, toss is performed a specific way)<a href="#_ftn4">[4]</a> = 1/2, where our reference class is implicit. Similarly, in physics, we might say that the probability of an electron being in some orbital shell is 1e–6. In this case, this probability <em>is</em> the number of atomic simulations in which the simulated electron appears in the designated orbital shell, and so is relative to our set of simulations. As for platitudes that signal unconditional probabilities, this merely suggests that in certain cases we do have canonical reference classes. Having said this, the natural question now follows: how are we to delineate reference classes in terms of ‘sufficient similarity’? At arbitrary granularity, we can always arrive at differences between any two objects in the reference class — but of course, finite frequentism seems absurd in the case of the trivial reference class. I want to argue that the level of difference we can accept amongst reference classmates is highly context dependent, and rightly so. For example, consider the case where a 20-year-old male <em>X</em> is to ask his doctor the probability of dying by age 50. The doctor might calculate the probability as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/549/1*DqB4SJtQ09ybUlYjpHhu8g.png" /><figcaption>Equation 1</figcaption></figure><p>where <em>R</em> is a finite set of males (who lived to 20) in the same income bracket and country as <em>X</em><a href="#_ftn5"><strong><em>[5]</em></strong></a>. The worry is the following: should the doctor continue to narrow down the reference class <strong><em>R</em></strong> to exclude those not of the same race, ethnic background, family size, dispositions to genetic disease, and so on? One reply might be to say that we should only match reference classmates on <em>causally relevant</em> factors. In this case, living on a specific street will likely not be causally relevant to death, whereas the level of access to proper medical care will be. Even if we assume that any notion of causal relevance will depend circularly on how it affects the probability, this is only problematic if we assume there is ‘one correct’ probability. Consider a second example of two finite frequentists <em>A</em> and <em>B</em> calculating probability a horse <em>H</em> (of breed <em>H*</em>) in the outermost stall will win a race. Perhaps <em>A</em> thinks to look at past races consisting of the same breed of horses where <em>H*</em> wins, and <em>B</em> thinks to look at races consisting of the same weather conditions where the horse in the outermost stall has won. These are clearly different reference classes (and so probabilities), but both seem defensible. I imagine a classic probability theorist might argue that this is the wrong way to go about assigning the probability. Rather, we should appeal to <em>possible</em> outcomes in the system and assign them equal probabilities given our epistemic indifferences. I suspect that breaking down a complex situation like this into equi-possible <em>elementary</em> outcomes will also require some notion of which variables are important — after all, on which axes shall we split? Of course, causal relevance comes back to bite us<a href="#_ftn6">[6]</a>. In any case, this problem is not unique to the finite frequentist interpretation of probability. Though I have been brisk here, I have aimed to show that Hajek’s concerns involving reference classes are not solid reasons for rejecting our account.</p><h4>The Bias &amp; Single-Occurrence Objections</h4><p>There is a further problem which is often considered to be fatal to the finite frequentist account: what if our measurements are somehow biased? Consider the following: we often say that a fair coin <em>C</em> can land ‘heads’ 9 out of 10 times that we flip it<a href="#_ftn7">[7]</a>. Clearly, the thought goes, the finite frequentist can commit to no such platitude since <em>P</em>(<em>C</em> lands heads) is nothing more or less than <em>(# of actual occurrences of heads in flips of C</em>)/(<em>total # of flips of C</em>) = 9/10. We would instead like to say that it is still possible, appealing to the fairness of the coin, that <em>P</em>(<em>C</em> lands heads) = ½, even if we destroy the coin and never flip it again. Surely, if the assumption is that probability <em>is</em> an <em>intrinsic</em> property of the coin, this argument is begging the question. Even so, the finite frequentist can salvage this platitude. I think the inconsistency here occurs via our appeal to the ‘fairness’ of the coin, which seems to be an <em>a priori </em>commitment before (or regardless of) any observations. We must explicitly make the jump by committing to the fact that <em>C</em> is part of a larger collective (i.e. reference class) of 2-sided symmetric coins. Having stated this, we might say that P(<em>C </em>lands heads) with respect to the reference class of ‘all flips of coins sharing the fairness characteristic with <em>C</em>’ is (# of actual occurrences of heads in all fair coin flips)/(total # of all fair coin flips), which is indeed close to ½. I will not pretend to defend a rigorous definition of fairness here, but my point is simply that the in-sample error objection relies on some relation that flips of <em>C</em> have with a broader reference class, something we can express in a finite frequentist account. The finite frequentist can pursue similar arguments for single-case occurrences. When a coin <em>C’</em> is flipped once (total), but our intuitions tell us the probability of heads is something other than 0 or 1, we are implicitly committing to a broader reference class of coin flips (where <em>C’ </em>is not involved). Moreover, the finite frequentist will not have major difficulty in making sense of ‘unique’ single-occurrence events such as P(<em>Trump wins the 2016 election</em>). As illustrated in the horse example earlier, we might first characterize the events by its relevant variables and form multiple probabilities<a href="#_ftn8">[8]</a>, or we might identify the probability with relative frequencies in a reference class of <em>simulations</em> as in the electron example.</p><h4>Other Issues</h4><p>I want to wrap up my defense by considering a few troublesome issues that are consistently present in Hajek’s arguments, including ones we have already seen. Hajek will often beg the question: for example, he says that the concept of probability should <em>explain</em> relative frequencies. Of course, this <em>assumes</em> that we simply <em>cannot</em> identify the two — and so in what sense can he expect one to mount a defense against this? Moreover, he conflates metaphysics and epistemology in various places. Most notoriously, he makes the claim that the probabilities in this account are influenced by <em>future</em> events. Of course, this is not the case: the probability is well-defined even if the entirety of the reference class is not known at time <em>t</em> or observed by a subject (after all, finite frequentism is an objective view).</p><h4>Conclusion</h4><p>Though I am under no illusion that I have saved the view from all of Hajek’s arguments, it should now seem clear that Hajek’s 15 contentions are not as bulletproof as they might first seem — and the finite frequentist account still deserves to hold a place as an interpretation.</p><p><a href="#_ftnref1">[1]</a> Strictly speaking, it is 0.05 with respect to the draws we have just described. We can restrict the reference class further to fewer draws, or more generally consider all draws made, whether we observe them or not. More on this later.</p><p><a href="#_ftnref2">[2]</a> The reader might find that this section makes no strong claims of correctness. My goal here is only to show that the finite frequentist does not deserve to always be on her last leg when defending the account, and we should feel the force here as much as Hajek’s own intuitions.</p><p><a href="#_ftnref3">[3]</a> <em>Randomized trial of cholesterol lowering in 4444 patients with coronary heart disease: the Scandanavian Simvastatin Survival Study (4S)</em>, Published in <em>Lancet</em> 1994 by Pedersen et al. The passage quoted is taken from ‘Results in Women and patients aged &gt; 60’.</p><p><a href="#_ftnref4">[4]</a> We will get to issues with framing a reference class later in this argument: the point of this example is simply to motivate the idea that reference classes are needed in the simplest of cases.</p><p><a href="#_ftnref5">[5]</a> With this example, I also want to suggest that this is a quite natural way to determine this probability — we perform this procedure all the time, and with quite remarkable success!</p><p><a href="#_ftnref6">[6]</a> For extended discussion, see Bertrand’s box paradox.</p><p><a href="#_ftnref7">[7]</a> I call this the <em>in-sample</em> error objection because we might conventionally say that 9/10 is nothing more than the tally in our sample, and cannot be identified with probability.</p><p><a href="#_ftnref8">[8]</a> e.g. P(businessman wins) with respect to all elections; P(individual with net worth over $1b USD wins), etc.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef00250e2caf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I increased my stress and decreased productivity in 10 easy steps]]></title>
            <link>https://medium.com/@kshithappens/how-i-increased-my-stress-and-decreased-productivity-in-10-easy-steps-69a24b6624cb?source=rss-881048cc8b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/69a24b6624cb</guid>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Kshitij Grover]]></dc:creator>
            <pubDate>Thu, 14 Apr 2016 23:54:50 GMT</pubDate>
            <atom:updated>2016-04-18T22:22:02.666Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_CBWz3p0doLzv7PhcJNFaw.jpeg" /><figcaption>‘Motivating_Image.JPEG’</figcaption></figure><p>I’m an experienced veteran of the working world. Let me tell you how to lead a better life (I’ll also link to some cool articles I’ve written at the bottom that are on an ad-supported website and urge you to try my unrelated product that I’m launching today. Rate, Comment, Subscribe).</p><ol><li>Clean your desk! Do it. Right after you finish this piece, get to work. No really: it’s a life changing magic that will keep you on top of the NY Times best seller list for weeks on end.</li><li>Creative geniuses like Steve Jobs were fueled by the mess around them. Make <em>sure</em> your desk has inspiration on it. It <em>has</em> to be randomly placed. Albert Einstein once said: “If a cluttered desk is a sign of a cluttered mind, of what, then, is an empty desk a sign?” He continued on to say, “I love the new Model 3” (Brainy Quips 18).</li><li>You should wake up early in the morning. The early bird gets the worm. The guy who leads Starbucks gets up early — 4:30 am! (Business Outsider 5).</li><li>Remember to burn the midnight oil. You’ve never heard of creative insomnia? It’s all about the hustle. I don’t care whether you’re on a plane at 2am or you’re chronically exhausted. You snooze, you lose. (Elitism Hourly 26).</li><li>Network a lot. Be expressive and social. Go to as many meetings as you can when you’re in the office. Not invited? Take initiative. No calendar can dictate your schedule. Show up and say you’re just <em>checking out the vibe</em>. If people attack you for butting in, tell them it’s for your personal growth. Networking has immense ROI (<strong>R</strong>eturn <strong>O</strong>n <strong>I</strong>rritation).</li><li>People respect those who are silent. Don’t speak too much. Stay distant. Eat lunch at your desk. It creates an air of mystery. If you are in any social situation, the only thing you should say is “interesting”. You may either nod or shake your head along with this verbal outcry. Most importantly, when you speak (and do this with caution), only whisper. Whispers are the loudest.</li><li>Dress to impress. You’ve gotta dress for the role you want, not the role you have. Formal Fridays present a false dichotomy. You can never be overdressed for the occasion.</li><li>Be casual. Wear a tank top to work, because your comfort is all that matters. Cultural norms are the poison of our society. Never allow your self worth to be dictated by what others think. If you’re focused on fitting in, you can’t stand out.</li><li>People pleasers are charming. Be a Yes-Man (especially if you’re a Woman). If you ever feel overwhelmed by agreeing to something, refer to #4. The only thing that matters is whether you’re delivering above expectations.</li><li>No one likes a push over. Push others over. Assert dominance at every possible opportunity. If you’re asked to do something by your boss, schedule a one hour one-on-self to discuss it. Don’t say ‘yes’ unless the task will revolutionize who you are as a person.</li></ol><p>Meditate deeply on these things every morning. Just don’t overthink your life — go for it.</p><p><strong><em>Hopefully you’ve realized this is not serious advice — what’s your productivity or ‘productivity’ story? Like satire? Tweet me @kshithappens with your favorite articles!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69a24b6624cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ambiguous Manipulations]]></title>
            <link>https://medium.com/@kshithappens/ambiguous-manipulations-8a06b9f62e53?source=rss-881048cc8b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a06b9f62e53</guid>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[medicine]]></category>
            <category><![CDATA[philosophy-of-science]]></category>
            <dc:creator><![CDATA[Kshitij Grover]]></dc:creator>
            <pubDate>Tue, 15 Mar 2016 01:31:58 GMT</pubDate>
            <atom:updated>2016-04-03T21:25:08.309Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Kshitij Grover 03/14/16, Rev. 04/03/16</em></p><h4><strong>Introduction</strong></h4><p>In this essay, I will consider the problem of modeling a causal system using scientific data and a set of basic assumptions. In myriad fields — from economics to medicine — a significant goal is to build a model of the system under study so we can properly perform <em>causal inference. </em>Specifically, we want to parse relationships from the variables in the data that will accurately predict the functioning of the system under a modified state. I will begin by giving a brief account of the process through which we can build such a model, and pay particular attention to the problem of ambiguity in manipulations as stated by Spirtes and Scheines. I will then consider the practical implications of the scenario in which this ambiguity arises, and argue that it is not entirely catastrophic to the field. In particular, the novel contribution of this piece is to trace the genuine historical motivations underlying an example in this field, which subsequently inform my position.</p><h4><strong>Building a Causal Model</strong></h4><p>Although there are many subtleties when it comes to building a causal graph from a set of data, I will outline only what is necessary to understand the core of my argument.</p><p>Let’s consider a set of variables, <strong>V</strong>, under measurement, and assume that this set is causally sufficient (there cannot be any extraneous, unmeasured factors that are connected to two variables in <strong>V</strong>). We will assume that at the time of measurement, the probability distribution is stationary and the relationships are acyclic: these two assumptions will allow us to build a time-index free directed causal graph <em>G </em>with a vertex for each variable. A directed edge<em> </em>from a variable A to B (“A causes B”) signifies that a change in A leads to a change in B (in other words, we implicitly assume that the notion of causality is dependent on <em>interventions</em> on variable states).</p><p>Importantly, we must make two more assumptions: the Markov Condition, and Faithfulness. The Markov Condition says that any variable is independent of its non-descendants, conditional its parents. Faithfulness, on the other hand, implies that there are no unobserved independencies: any independence in the data distribution must be modeled by the graph itself and not occur by some sort of ‘canceling out’ effect of positive and negative correlations. The full justification for these assumptions is out of the scope of this paper, and can be found in <em>Causation, Prediction and Search</em> by Spirtes et al.</p><p>Granted these assumptions, there are well-known algorithms for developing a set of possible causal graphs (often called a Markov equivalence class). These algorithms function by starting with a completely connected graph: then, by statistically testing the probabilistic unconditional and conditional independencies amongst the variables, they can narrow down the set of causal graphs that fit the data.</p><h4><strong>Manipulations</strong></h4><p>For practical purposes, causal graphs will be most useful when they can be used to infer how the system will respond to an intervention on one or more variables. Let’s consider an abbreviated version of the example used by Spirtes and Scheines, and one that I will refer to through this paper (Spirtes 2).</p><p>Suppose we’re interested in modeling the relationship between Heart Disease (HD), LDL, and HDL cholesterol, each of which take on values of Low/Medium/High. We can collect data from our population of units (e.g. patients in a clinical trial), and then build the causal graph: we will arrive on the well studied result that LDL and HDL both have a causal relationship with HD. The former is correlated with an increase in HD, and the latter is correlated with a decrease in HD. This will translate properly into the idea of interventions: manipulating HDL or LDL to ‘High’ will indeed result in an observed change in the probability of HD, as they are the supposed causal drivers in the system.</p><h4><strong>Ambiguous Manipulations</strong></h4><p>To pinpoint the concern of this paper, we will have to tweak the preceding example. Suppose, instead of measuring HDL and LDL cholesterol, we simply measure Total Cholesterol (TC). We can immediately see that TC is not a causal driver in the “true” system; it is definitionally (as opposed to causally) related to HDL and LDL. Moreover, TC under-specifies its root variables: specifying TC = <em>Medium</em> could mean LDL = <em>High </em>and HDL = <em>Low, </em>or the exact opposite.</p><p>Thus, Spirtes and Scheines appropriately term the manipulation of TC to be ambiguous: we cannot reliably predict how the system (in this case, specifically Heart Disease) will react when we intervene on TC, as the intervention genuinely changes the underlying LDL and HDL in an unspecified way.</p><h4><strong>Suggested Solutions</strong></h4><p>The issue of ambiguous manipulations clearly points to a crucial epistemic problem in the scientific endeavor. When can we identify that manipulations in any system under study are ambiguous? How can we remedy or be better positioned under these circumstances?</p><p>Is it possible for scientists to know when they are measuring (and thus postulating ambiguous manipulations on) the wrong variable? Given what we know about HDL and LDL (and their opposing contributions to the effects on HD), one might appeal to the absurdity of measuring and manipulating TC instead. Indeed, parametrizing the relationship between TC and HD would be problematic at best and impossible at worst; for example, our measurements would inevitably contain an enormous amount of variance amongst patients who had elevated TC levels, even controlling for all other factors. However, note that we are not always in this epistemically privileged position of knowing the underlying causal drivers.</p><p>If we could only measure (and manipulate) TC due to lack of research in the field, what indications would we have that TC is indeed a function of two underlying and conflicting causal variables?</p><p>In order to advance this account, we must first admit a more fundamental fact about the scientific endeavor: a search for (or a <em>belief in</em>) deterministic real-world processes. Although I do not fully argue for this claim here, I would like to note that it is not as hefty as it may seem. We routinely make the implicit assumption in experimentation that building a better picture of the world involves collecting data that exhibits lower variation and models that respond in stricter accordance with expected outcomes. Surprisingly — given a modern account of quantum mechanics — we may know that fundamental atomic scale processes are <em>not</em> deterministic, but the mentality of eliminating noise holds on a general multidisciplinary scale.</p><p>Returning to our example with this in mind, we first note that LDL and HDL themselves are not <em>perfectly </em>deterministic predictors of HD; in any practical situation, there will always be latent variables, error terms, and noise. However, we intuitively accept LDL and HDL as a ‘better’ causal account since we are better able to predict a patient’s likelihood of HD at this level of analysis. This points to a solution to these scenarios given that we have an omniscient view of the variables: we would like to pick the set of variables that lead to lower variance upon manipulation and measurement.</p><p>In the more common case that we are blind to the more granular variables, the situation is more perplexing — should we simply accept that a given causal system is inherently noisy, or should we continue to search for divisions of our variables that exhibit lower variance? Although the example in Spirtes is ostensibly hypothetical, it will be useful to consider the factual history of TC and HD . In the 1950 paper entitled <em>Blood Lipids and Human Atherosclerosis</em>, Gofman et al. report:</p><blockquote>[…] in spite of evidence that cholesterol levels are often above 260 mg % in persons manifesting atherosclerosis, there is also good evidence that a high proportion of individuals develop atherosclerosis with blood cholesterol [in the accepted range] […] Further, even with cholesterols above 200 mg.% [..] the extent of atherosclerosis in humans was not well correlated with the actual cholesterol levels (Gofman 2, 161).</blockquote><p>As we suspect, Gofman’s reported reasoning is the difficulty his team and the medical community had in parametrizing the relationship between cholesterol levels and the “extent of atherosclerosis”. Had Gofman believed that this biological process was inherently noisy (as opposed to a deterministic), they certainly would not have pursued the topic further. Later in the paper, they report the findings that via centrifugal separation, the team was able to discover specific (low) density molecules that were better correlated with atherosclerosis, a precursor to the distinction we make between LDL and HDL today. What motivated researchers like Gofman to use the centrifuge and look for a better set of variables? In another paper, Gofman notes that:</p><blockquote>Some workers claim a significant elevation in blood cholesterol level for a majority of patients with atherosclerosis, whereas others debate this finding vigorously. (Gofman 1, 166–167).</blockquote><p>This statement points to a crucial characteristic we can expect to observe when dealing with ambiguous manipulations. Simplistically speaking, if one experimenter manipulates TC to ‘Medium’ by (unknowingly) recommending high levels of HDL and another manipulates TC to ‘Medium’ with low levels of HDL, then they will both consistently see a strong correlation between TC and HDL. This sort of ‘vigorous’ inconsistency between experimenters (but perhaps less variance amongst one set of manipulations) will often indicate an ambiguous manipulation. Note that this line of thought also does work to address the question of how we can distinguish noisy processes: if the process was inherently noisy we would expect to see similarly noisy results in any such dataset.</p><p>Apart from this indicator, Gofman’s papers suggest another situation in which we should be suspicious that our level of analysis is incomplete: when the level of variance between variables in the current causal process is an anomalous given other results in the field. In his paper about atherosclerosis, Gofman specifically cites the comparatively well-studied relationship between insulin and <em>diabetes mellitus </em>(167).<em> </em>If we can establish the relationship between another molecule in the bloodstream (insulin) and a macro-level disease such as diabetes, the burden of proving that a similar causal model is fundamentally noisy will be much larger. If we generalize this notion, we can see that each field will have a very different ‘threshold’ of variance that it is willing to accept, whether that is due to the necessary precision required in the outcome of studies, or acknowledged sampling difficulties. In a field where we are concerned with which variables cause certain types of fatal cancer, we are certainly much less willing to accept noise in the parametrization of variables, and will do all that is possible to eliminate ambiguity. However, this may not be the case when it comes to studying consumer behavior in economics, where discovering any ‘deterministic’ relationships by splitting variables to a granular scale may be futile.</p><h4><strong>Conclusion</strong></h4><p>Although it may be tempting to assume that there is no reliable way to determine when we have the right variables in a system, we have shown that there exist some indicators that should make us suspicious. Through a discussion centered on Spirtes and Scheines’ simple example on Total Cholesterol, it seems clear that we should use lower variance in data (higher degree of determinism) as a standard. Moreover, there are certain practical situations such as conflicting results from experimenters and deviating from the field that can help us to detect ambiguous manipulations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a06b9f62e53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Relevance of Stoicism]]></title>
            <link>https://medium.com/@kshithappens/stoicism-life-and-death-403c934a3de9?source=rss-881048cc8b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/403c934a3de9</guid>
            <category><![CDATA[meditation]]></category>
            <category><![CDATA[mindfulness]]></category>
            <category><![CDATA[stoicism]]></category>
            <dc:creator><![CDATA[Kshitij Grover]]></dc:creator>
            <pubDate>Sat, 05 Mar 2016 22:45:05 GMT</pubDate>
            <atom:updated>2016-04-03T21:32:08.264Z</atom:updated>
            <content:encoded><![CDATA[<p>Google the definition of ‘stoic’, and you’ll see that a stoic is simply:</p><blockquote>a person who can endure pain or hardship without showing their feelings or complaining</blockquote><p>Indeed, this is how ‘being a stoic’ is usually thought of, at least in popular culture — a way to live without emotion. It’s a way to insulate yourself and live sternly. Perhaps this sentiment is why stoicism is regarded as impractical, overly simplistic, and easy to dismiss. Isn’t having emotion what it means to be human? Should we not be vulnerable — afraid, sad, and joyful?</p><p>Of course — and in reality, stoicism is not a call to abandon who we are. It is a call for mindfulness.</p><p>What does that mean, anyways?</p><p>Stoicism originated in Greece, founded in the early 3rd century. In all ways, it is a normative and practical philosophy: stoics such as Seneca, Marcus Aurelius, and Epictetus were very much concerned with how we should live our lives and spend our time.</p><p>A stoic is one who introspects carefully and thoughtfully about emotions. Though it may not be easy to rid ourselves of negative thoughts like jealousy, greed, and anger, the stoic is able to separate himself from these passions. It is easy to fall into the trap of thinking that a stoic is one who is apathetic. This is not the case — stoicism urges you to be in control of how these thoughts influence you and having the command to “withdraw your assent”. A stoic realizes the difference between what is under his control, and what stems from external influences.</p><p>In the stoic philosophy, what is most treasured is one’s “virtue” — a kind of moral standard that we can abstractly identify with a state of the soul that corresponds to “perfect reason”. In some sense, “virtue” consists of wisdom, justice, courage and moderation — but these are not components that one can separately possess. A virtuous person simultaneously holds all “virtuous” qualities by holding one. With some context on “virtue”, stoics do not hesitate to make extreme statements. Happiness is implied by only virtue, and so things like money, sex, work, and even life (our own and loved ones) are simply “preferred”. The only detriments to our happiness are special forms of vices that break down our “virtue”.</p><p>I claimed before that stoicism was practical — so where does this line of thought get us? One of the more well-known modern day stoic scholars is Massimo <a href="http://opinionator.blogs.nytimes.com/author/massimo-pigliucci/">Pigliu</a>cci, who sheds some light on this. We should spend time thinking about how our virtue might be tested over the course of the day — for example, what experiences will test our courage or compel us out of moderation? We should consistently reflect on how we plan to deal with unfavorable outcomes — the loss of the “preferred” entities. Here, Massimo mentions that it is not wrong to think of or visualize death itself.</p><p>I want to leave off with one of my personal favorite sayings from Seneca’s letters, where he is concerned about the shortness of life. His argument here is once again about mindfulness about how we spend our time:</p><blockquote><em>It is no use pouring any amount of liquid into a container without a bottom to catch and hold it, so it does not matter how much time we are given if there is nowhere for it to settle; it escapes through the cracks and holes of the mind..</em></blockquote><p>By all means, being a stoic is not easy or this simple. Stoicism is a subtle and complex philosophy, with branches extending outside of morals and meditation. Yet, one thing is certain: stoicism is as relevant as it was thousands of years ago.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=403c934a3de9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Asana, through an intern’s eyes.]]></title>
            <link>https://medium.com/@kshithappens/asana-through-an-intern-s-eyes-6c603c8954a5?source=rss-881048cc8b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c603c8954a5</guid>
            <category><![CDATA[asana]]></category>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Kshitij Grover]]></dc:creator>
            <pubDate>Thu, 17 Dec 2015 20:13:48 GMT</pubDate>
            <atom:updated>2015-12-19T01:28:33.691Z</atom:updated>
            <content:encoded><![CDATA[<p>My time at Asana was different from the beginning. Not only did it take me a <em>year</em> to finally wrap up the recruiting process —having stopped and picked it up again over the months — it was a <em>fall </em>internship — meaning I skipped a term of school to work in San Francisco and with no other interns.</p><h4>Oh, boy…</h4><p>Let’s zoom back to the first day. I knew what to expect going in — it was going to be the same story as <em>always</em>. One organizational meeting after another, until I get handed a laptop, told that I <em>probably shouldn’t expect to get anything done for the first week</em>.</p><p>Remember what I said about it being different? Here’s a glimpse at what my Asana onboarding project looked like on the first day:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*o4gX-ti32Nf7wloryJDphg.png" /><figcaption>Imagine if there were a meeting for each one of these, and that’s the first-week flow of many companies!</figcaption></figure><p>There are a couple things to note here. Not only did this quickly get me familiar how Asana uses the product internally (the word <em>ubiquitous </em>comes to mind), but it also let me do this at my own pace. It told my mentor exactly what I was stuck on and what I was speeding through.</p><p>Alright — great — set up. Time to start coding, right? No, really, I mean it. Here’s my commit to master on Day 1:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hwslg0kdGFEYTo4_s4IR_g.png" /><figcaption>4:59 pm on Day 1</figcaption></figure><p>In a sentence, the rest of my experience followed suit. The deeper I got into my internship, the more I realized that Asana’s values are more than just words strung together so they look good (they <em>do look good</em>).</p><p>I’m not going to highlight everything that stuck with me, but there are a few things I can’t help but mention.</p><h3>Transparency in action.</h3><p>Look, let’s be honest: every company I’ve heard about claims they’re <em>open and honest</em> with employees. Living up to that is notoriously hard. At Asana, you can see internal financials, recruiting discussions, and the company’s business outlook from day one. No fancy permissions for “hidden projects”. No “all-hands-except-interns” meetings. This wasn’t obviously a good thing at first glance: what if someone leaked some numbers? What if private conversations came into public light? After all, there <em>is</em> a lot of attention on these high-growth tech companies from the media.</p><p>After a couple weeks here, I knew why my fears were misplaced. It comes down to the fact that <em>every policy is (can be) risky</em>. It just happens to be the case that folks here at Asana place more value on empowering individual employees to participate in discussions than everything else. If everyone feels trusted, valued, and empowered, it’s easy to stop fretting about the smaller things.</p><h3>Learning as a team.</h3><p>Over the last couple of years, I’ve come to appreciate the interest companies take in helping employees learn and grow at whatever they may do — engineers, designers, writers — but also as people. I think Asana takes this learning mindset to a different level.</p><p>Rather than simply concentrate on helping people do their jobs better, Asana is focused on figuring out how the team and company can consistently improve processes to achieve goals. The key insight here is that a team of intelligent people stuck with poorly thought-out processes falls victim to that weak link. In action, this looks like:</p><h4>5 whys</h4><p>Before joining Asana, I <a href="https://medium.com/@kshithappens/life-is-an-xy-problem-e7a261407074#.m4cp8oeqv">wrote something </a>about how humans are susceptible to the “XY” problem — a rephrasing of the tunneling effect — citing the solution as:</p><blockquote>Ask why 5 times</blockquote><p>Turns out, Asana lives this ideology. When something goes wrong — be it unusually high-recruiting load, a significant engineering failure, or simply missed deadlines — the team gathers to discuss. What went well? What broke? What are the actionable items? Not only does this help to set a clear understanding of the situation, it prevents unnecessary blame from being thrown around. It stops fragmented communication between teammates about a problem. Fragmented communication is <em>miscommunication</em>.</p><h4>Roadmap Week, KRs</h4><p>Being a fall intern was a blessing in (heavy) disguise. Not only did I start on the week with the most exciting recent launch (a redesign of the product), I also learned how Asana thinks about organization.</p><p>Before I move on to the concrete process, let’s take a look at the<a href="https://en.wikipedia.org/wiki/Planning_fallacy"> Planning Fallacy</a>, first proposed by Daniel Kahneman. It’s quite simple, really:</p><blockquote>Predictions about how much time will be needed to complete a future task display an <a href="https://en.wikipedia.org/wiki/Optimism_bias">optimism bias</a> (underestimate the time needed).</blockquote><blockquote>Kahneman and Tversky originally explained the fallacy by envisaging that planners focus on the most optimistic scenario for the task, rather than using their full experience of how much time similar tasks require.</blockquote><p>If you have industry experience, you’ve seen every company and every team fall victim to this.</p><p>Now, the golden question: how do you fix it? The Wikipedia article, in fancy words, says “Implementation Intentions” and “Segmentation”. Really, this boils down to what Asana does at Roadmap Week.</p><p>Three times a year, every team at Asana gathers for a week to discuss how they’re going to approach the <a href="https://blog.asana.com/2015/04/episodes/">episode</a>. Here’s where the team sets <strong>K</strong>ey <strong>R</strong>esults, publishing and presenting tangible goals as to what they want to accomplish over the next few months. The team is asked to imagine and create a story about how the world would look if everything went to plan. How would the world look if it was a disaster? At this point, you’ve gotta be thinking — this is just the act of <em>costing</em>. Every team does that!</p><p>Yes and no. The point here is that it’s <em>purposeful. </em>Of course, teams can do this ad-hoc at any given company, but it’s crucial that the processes support and facilitate it. This is not an opportunity for specific teams to think about the work they need to get done; it’s a chance for everyone to be on the same page about where the company is going.</p><h3>People, first.</h3><p>I’ve been using the words “Asana” and “the company” throughout this post, and that makes it so easy to lose sight of an obvious truth:</p><p><em>The company is nothing more and nothing less than the people that make it so.</em></p><p>Most companies, somewhere down the line, lose track of this. In trying to build a “good culture”, they forget that <em>employees evangelize</em>. In trying to have “a fast moving technical team”, they forget that<em> engineers have to constantly learn and grow</em>. None of the goals of “the company” can be realized without the people that build and support it.</p><p>Asana is astonishingly good at this. There’s an emphasis on <a href="https://medium.com/building-asana/work-hard-live-well-ead679cb506d#.b41rjhtlb">Work Life Balance</a>. The <a href="https://asana.com/jobs">perks</a>, from simple things like a gym membership to mentorship and executive coaching, are centered about making better people, not better employees.</p><p>I’ve never been in a 1:1 where I’ve spent more than 20% of the time talking about work. The conversations are centered around how you’re <em>doing</em>, not how you’re <em>working</em>.</p><p>In a more subtle way, this extends to how Asana thinks about company structure. The trap of having an extensive hierarchy of managers and bosses is a tempting one. When you’re constantly worried about moving from SE1 to SE2, it’s easy to understand how the company prioritizes work more than your personal well-being. Asana’s system is (yeah, you got it — ) different. Asana is focused on giving individuals responsibility over real domains rather than just responsibility over a group of people. Any engineer — including new hires — can gain ownership of important parts of the company’s work, anywhere from AORs like “Onboarding Process” to “iOS Bugs”.</p><p>One last thought: maybe it’s telling that, in writing this post, I didn’t even think to mention what <em>team</em> I worked on or <em>what I did</em>. Maybe it gives you a little insight into how different this internship really was. Although the technical aspects of my work were far from mundane, 5–10 years from now, I’ll look back and be thankful that this is what I remembered.</p><p><strong><em>If you liked this post, it would mean a lot to me if you hit recommend below!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c603c8954a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bot Building ]]></title>
            <link>https://medium.com/@kshithappens/bot-building-9160033e0c4?source=rss-881048cc8b48------2</link>
            <guid isPermaLink="false">https://medium.com/p/9160033e0c4</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[telegram]]></category>
            <dc:creator><![CDATA[Kshitij Grover]]></dc:creator>
            <pubDate>Sun, 25 Oct 2015 06:09:23 GMT</pubDate>
            <atom:updated>2015-10-25T23:44:35.573Z</atom:updated>
            <content:encoded><![CDATA[<p>Let me preface by saying I have a <em>long</em> commute on the Caltrain every morning and evening — and I’m never quite sure how the timings are going to work, day in and day out.</p><p>So I built a bot for that.</p><p>Before we get into specifics, here’s a tour:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*nsPhTVjP6QExdvcSOjQhbQ.gif" /></figure><p>Got it? Let’s build it!</p><h4>Step 1: Register your Bot</h4><p>For this, you have to talk to the <a href="http://telegram.me/botfather">BotFather</a> on Telegram. It’s a lovely conversation:</p><blockquote><strong>Me</strong>: /newbot</blockquote><blockquote><strong>BotFather</strong>: Alright, a new bot. How are we going to call it? […]</blockquote><blockquote><strong>Me</strong>: CaltrainBot.</blockquote><blockquote><strong>BotFather</strong>: Good. Now let’s choose a username for your bot […]</blockquote><blockquote><strong>Me</strong>: CaltrainTimeBot</blockquote><p>That simple.</p><h4>Step 2: Get some 🚊 data</h4><p>When I thought about this venture, I was dreading this step. Caltrain’s terribly modern <a href="http://www.caltrain.com/schedules/weekdaytimetable.html">timetable</a> would’ve been a disaster to scrape, especially if I wanted to serve up every single station and trip. Not going to happen.</p><p>And yet — there are surprises in this world. Turns out Caltrain thought of 3rd-party developers and <a href="http://www.caltrain.com/developer.html">gave them a .zip</a>! Luckily for us, this is in the <a href="https://developers.google.com/transit/gtfs/reference?hl=en">GTFS (General Transit Feed Specification)</a> and not some arbitrary format that Caltrain dreamt up. This means we can use <a href="https://github.com/google/transitfeed">transitfeed</a>, a python library from Google, to parse our data.</p><p>Great, downloaded. Now what?</p><h4>Step 3: Parse the Data</h4><p>The word ‘parse’ here is a little misleading. This is basically a query — we want to build some functionality such that we can fulfill the following flow:</p><blockquote><strong><em>Input (A)</em></strong><em>: Departure Station, Arrival Station</em></blockquote><blockquote><strong><em>Output (A):</em></strong><em> Possible Trips</em></blockquote><blockquote><strong><em>Input (B):</em></strong><em> Trip (Departure Time) Selection</em></blockquote><blockquote><strong><em>Output (B)</em></strong><em>: Arrival Time</em></blockquote><p>So let’s dig into this file-format we have. This gives us access to the data, with the following objects:</p><ul><li>Stop</li><li>Trip</li><li>Fare</li><li>Stop_Times</li><li>Routes</li></ul><p>We definitely want all the stops, so let’s get that out of the way:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/42cce3894b1cd1a94bbd2f2876e9fa77/href">https://medium.com/media/42cce3894b1cd1a94bbd2f2876e9fa77/href</a></iframe><p>Ok, so things are never that simple. Unfortunately, there is a problem with this. There are a bunch of duplicate stops in the list! Through some quick testing, I found out that I only want the stops whose stop_id ends with “2”. We’ll add that in as a simple condition. Ok — now what?</p><p>Given a departure_id, an arrival_id, and an indication of weekend/weekday we want to query of all the trips! Luckily for us, the format gives us two things:</p><ul><li>stop.GetStopTimeTrips() — returns a list of trips that pass through this stop, along with their departure time from this stop and the index at which this stop is in the trip order</li><li>trip.GetStopTimes() — returns a tuple of (arrival_time, stop) for all stops this trip makes</li></ul><p>With a combination of these, our job is simple enough. We’ll look at all the stops to find the departing stop. Then, we’ll see all the trips that hit that stop and find trips such that they hit our arrival stop <em>after </em>the departure stop:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d195efb1aa953bd6d6ba09955ce18ebc/href">https://medium.com/media/d195efb1aa953bd6d6ba09955ce18ebc/href</a></iframe><p>I wish this worked. In fact, it almost does! It works fine when we are trying to query San Francisco → Sunnyvale, but not the other way around. Weird, huh?</p><p>As it turns out, Caltrain decided to use <em>separate stop_ids </em>for northbound and southbound platforms. Here’s the good news: the only difference in the <em>id</em> is that the last number is ‘1’ instead of ‘2’, and we also have the property that the northmost station has the lowest stop_id. This makes life tedious, but not so hard:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/614600da8a996764376e69aaa2a8e1e9/href">https://medium.com/media/614600da8a996764376e69aaa2a8e1e9/href</a></iframe><p>Cool — this all works well — in a terminal. Let’s make it light up.</p><h4>Step 3: Make the bot talk</h4><p>Telegram makes this incredibly easy — props to their devs. It’s as simple as a method call to getUpdates(offset, timeout).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0896548be8eec34aa3b3be765f2e9689/href">https://medium.com/media/0896548be8eec34aa3b3be765f2e9689/href</a></iframe><p>Note here that in addition to the message text, we also have a chat_id (which we need in order to send a message back), and the user that said it.</p><p>We want to kick things off when the user says “<strong>/train</strong>”.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/48191e19bde71d74ed7ec41375dee58a/href">https://medium.com/media/48191e19bde71d74ed7ec41375dee58a/href</a></iframe><p>The custom_keyboard you see above is the coolest part of this process, and we use it for every message in the flow! We just go ahead and take the list of stops and display them as a custom keyboard.</p><p>Before we keep going, we want to be careful. Note a problem here:</p><ul><li>The stream of updates isn’t isolated by user! That means that if 100+ people are using your bot at once, the stream will be all jumbled up. In more technical terms, it implies that the server has to maintain user state.</li></ul><p>It isn’t difficult to change this because we realized it early on. We have to keep track of a User’s “current” query and “current state”. At each step, we have to add information to that query and change the state.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/19fdc53a968ccde4698a91c9526441db/href">https://medium.com/media/19fdc53a968ccde4698a91c9526441db/href</a></iframe><p>Now that we can do that, we’ll keep a global dictionary mapping {user_id → state} and another one mapping {user_id → query}. All we have to do is react to any user’s message based on the state we’ve assigned them.</p><p>I won’t go over each of the messages in the flow, but here’s how we handle the weekday case:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2eef7d69dc51dabb9fe3afc1a4f96443/href">https://medium.com/media/2eef7d69dc51dabb9fe3afc1a4f96443/href</a></iframe><p>Like I said, we only respond like this if the current user has already been asked for their arrival time. This ensures that we don’t jumble up all the users that are talking to the bot. We also have to make sure that we update the state for the next message we get to work.</p><h4>Step 4: Run it on a server</h4><p>How <a href="https://aws.amazon.com/">AWS</a> works is out of the scope of this post, but let’s just slap our python code onto an EC2 instance and watch it work!</p><p>Here’s the basic steps (i.e. one of the ways to make this happen):</p><ul><li>Push your script to GitHub</li><li>Create an EC2 instance</li><li>Clone Script on the EC2 instance and install the python modules you need</li><li>Using `scp`, copy the data file onto the EC2 instance</li><li>Run!</li></ul><h4>Step 5: Share!</h4><p>The beauty of Telegram is anyone can talk to (and add!) this bot by visiting <a href="http://telegram.me/caltraintimebot">http://telegram.me/caltraintimebot</a>.</p><p>Of course, you can see <a href="https://github.com/kgrover/caltrain-timings-bot/blob/master/bot_script.py">my source code here</a>.</p><p>If you found this interesting, hit the green heart below to recommend. :-)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9160033e0c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>