<?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 Naim Kabir on Medium]]></title>
        <description><![CDATA[Stories by Naim Kabir on Medium]]></description>
        <link>https://medium.com/@naim-kabir?source=rss-95dd06d590c5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VPmMZ-YDH5-KluJiID308w.jpeg</url>
            <title>Stories by Naim Kabir on Medium</title>
            <link>https://medium.com/@naim-kabir?source=rss-95dd06d590c5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 01:08:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@naim-kabir/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[Goliaths Playing At David]]></title>
            <link>https://naim-kabir.medium.com/goliaths-playing-at-david-5b8643188ffb?source=rss-95dd06d590c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b8643188ffb</guid>
            <category><![CDATA[novel]]></category>
            <category><![CDATA[publishing]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[news]]></category>
            <category><![CDATA[writing]]></category>
            <dc:creator><![CDATA[Naim Kabir]]></dc:creator>
            <pubDate>Fri, 11 Aug 2023 00:11:50 GMT</pubDate>
            <atom:updated>2023-08-12T16:20:21.783Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RyPfADzgszWUaj36VBiJRQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@matcfelipe?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Mateus Campos Felipe</a> on <a href="https://unsplash.com/photos/hH6IAUtVLQw?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>How AI fear crushed the indie creator of ProseCraft.io for no good reason</h4><p>I’m a <a href="https://www.naimkabir.com/">writer</a>, but this will be a story criticizing writers.</p><p>I plan to debut a novel someday, and I know this may hobble my chances. The lit crowd is a close-knit and cliquey sort.</p><p>But I’ll do it anyway, because that’s what you do when giants go curb-stomping underdogs.</p><h3>The demise of ProseCraft.io</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AFTUH6ET7gyS7p4ripsDHA.png" /></figure><p>A few days ago, an independent creator had to <a href="https://web.archive.org/web/20230810205607/https://blog.shaxpir.com/taking-down-prosecraft-io-37e189797121?gi=e83622e26855">take down</a> his labor of love—ProseCraft.io—after <a href="https://www.themarysue.com/benji-smith-steals-thousands-of-books-for-ai-project-prosecraft-prompting-immediate-backlash/">crushing pressure</a> from the writing community.</p><p>ProseCraft was a project that had launched in 2017 and hadn’t actively maintained a blog presence since 2019, so this sudden and acute backlash must’ve been jarring, to say the least.</p><p>Even more surprising: ProseCraft.io seemed to just publish summary statistics on novels, with word frequencies and a few exotic metrics like “vividness”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OfWN6sdTKwt6MkdcksPMbQ.png" /></figure><p>Not terribly useful, but maybe when plotted on a trend-line over time, or compared across genres, it could uncover some interesting insights. Hard to say without fooling around with it. But it doesn’t seem terribly <em>harmful</em>, either.</p><p>So why the outrage? Why the <a href="https://web.archive.org/web/20230810183439/https://twitter.com/HashTagSpooky/status/1688620810112741377">death threats</a> and <a href="https://web.archive.org/web/20230810053016/https://twitter.com/LazlosGhost/status/1688668048105132033">verbal abuse</a>?</p><p>Who are all these angry people that came out of the woodwork to rake this random smalltime hacker over the coals?</p><p>There are two main buckets I see, here.</p><p><strong>Bucket one:</strong> the anti-piracy<strong> </strong>folks. These writers speculated that ProseCraft likely needed full-text novels to run analytics on them, and that such a large database probably wasn’t paid for out-of-pocket by just one dude.</p><p>This is a bucket of people I won’t directly address, because we just fundamentally disagree in our values. For purposes like analytics and research—even if that aggregated data is later sold, e.g. in a scientific journal or as part of consulting services—ripping a book is perfectly fine. I could do much the same by taking my library card, checking a book out of a digital library, analyzing it, and saving those numbers in my notes.</p><p>If these people were at all consistent in their views they’d probably also dunk on tools like <a href="https://en.wikipedia.org/wiki/Sci-Hub">Sci-Hub</a> or <a href="https://libbyapp.com/interview/welcome#doYouHaveACard">Libby</a>. Maybe they could learn a lesson or two from authors like Wallace Wang, who wrote <a href="https://www.penguinrandomhouse.com/books/565647/steal-this-computer-book-40-by-wallace-wang/">Steal This Computer Book 4.0</a>. You can probably imagine what his take would be.</p><p><strong>Bucket two: </strong>the folks who don’t want their work to be used in profit-generating AI. This seemed to be the larger cohort. It wasn’t the data-sourcing that was a problem—it was the fact that it might be used to train some sort of algorithm that a company could use to make money.</p><p>The creator of ProseCraft also had a monetized product called <a href="https://www.shaxpir.com/">Shaxpir</a>, and he made the fatal mistake of mentioning AI somewhere within a 3-mile radius of its product spec. This was all people needed to jump down his throat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XeIcCOzhqElcrL7G0LCaTg.png" /><figcaption>You done goofed here, Benji. Just use “NLP” next time and you’ll be free and clear.</figcaption></figure><p>But AI is a broad umbrella term. Some of it can be genuinely harmful—but a lot of it is so unsophisticated that it doesn’t even have the <em>capacity</em> to hurt the writing community.</p><p>The latter is what was at play, here.</p><h3>Technical breakdown</h3><p>After caving to pressure, Shaxpir <a href="https://blog.shaxpir.com/shaxpir-4-6-0-released-prosecraft-derived-data-removed-f1d9a3bd9d44">removed the features</a> that used algorithms trained on authors’ works. While tragic, it’s useful for our analysis because he identifies the features outright and we don’t have to speculate what he was doing.</p><p>These features were:</p><ul><li>A thesaurus function</li><li>A “vividness” and sentiment analysis of prose</li><li>Linguistic percentile analysis</li></ul><h4>Thesaurus</h4><p>This feature <a href="https://blog.shaxpir.com/shaxpir-4-5-automatic-popup-thesaurus-48a983f226d6">lets you swap out a word</a> with another one that makes sense given the context. Kind of like a regular thesaurus and its list of synonyms, but far more context-aware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mWwNh55Yhq-wIkC-.gif" /><figcaption>From the <a href="https://blog.shaxpir.com/shaxpir-4-5-automatic-popup-thesaurus-48a983f226d6">Shaxpir blog</a>.</figcaption></figure><p>How does it work?</p><p>By using a natural-language processing algorithm that is now positively medieval: <a href="https://www.tensorflow.org/text/tutorials/word2vec#:~:text=word2vec%20is%20not%20a%20singular,downstream%20natural%20language%20processing%20tasks">word2vec</a>.</p><p>How do you train it? In broad strokes:</p><ol><li>You represent every word as a set of random GPS coordinates that says where the word is in your “word-space”. Numerical representations of words are what let you do fun things like assert that “<a href="https://www.technologyreview.com/2015/09/17/166211/king-man-woman-queen-the-marvelous-mathematics-of-computational-linguistics/">King - Man + Woman = Queen</a>” and other cute little operations like that.</li><li>You chop up the text corpus—in this case, novels—into pairs of words that “co-occur”. Whether that means being right next to each other, or just sharing a clause, a sentence, or a whole document is up to you.</li><li>You jiggle the coordinates of each word such that their distance from each other roughly matches their co-occurrence rate in your document database.</li><li>Ta-da! You now have a word-space where each word-coordinate is representative of what other words they tend to appear by, and can be used in a narrative-focused thesaurus.</li></ol><p>None of this exploits an author’s voice, talent, or style—like maybe some modern Large Language Models might.</p><p>It certainly can’t be used to, say, <a href="https://www.npr.org/2023/02/24/1159286436/ai-chatbot-chatgpt-magazine-clarkesworld-artificial-intelligence">spam beloved sci-fi magazines</a> with factory-made submissions, or mimic an author’s brand to <a href="https://www.cnn.com/2023/08/10/tech/ai-generated-books-amazon/index.html#:~:text=Author%20Jane%20Friedman%20found%20several,the%20company%20to%20the%20issue">churn out derivative works</a>. You know, <em>actual</em> harmful uses of AI in literature.</p><p>ProseCraft and Shaxpir were barely a layer removed from just counting word-pairs. This family of statistical modeling is so unsophisticated that they’re called “<a href="https://en.wikipedia.org/wiki/Bag-of-words_model">bag-of-words</a>” models—because that’s what they do. Put a bunch of words disembodied from their sentences into a bag, and count them up.</p><h4>Vividness and sentiment analysis</h4><p>The <a href="https://medium.com/r?url=https%3A%2F%2Fblog.shaxpir.com%2Fwriting-vivid-prose-33283e861358">vividness-analysis feature</a> tells you how many “vivid” sensory words a block of text invokes as well as how intense they are.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PY1irdan0yA-qcLc.png" /><figcaption>A sample of “vivid” words, from the <a href="https://blog.shaxpir.com/writing-vivid-prose-33283e861358">Shaxpir blog</a>. How do “nipples” just get a 5.5? That seems wrong, honestly.</figcaption></figure><p>This feature might need:</p><ol><li>Part-of-speech tagging, which is a classic computational linguistics problem people have been hacking at for a while. This can isolate nouns, verbs, and adjectives.</li><li>Vividness classification, to identify words that count as “vivid”. The <a href="https://blog.shaxpir.com/writing-vivid-prose-33283e861358">Shaxpir blog</a> makes it seem as though they identified which nouns and verbs were vivid by hand. This takes a lot of elbow grease, and means that they personally dedicated time to <em>enrich</em> the dataset.</li><li>Vividness scoring, since not all vivid words were made equal. The intensity of the vividness appears to be based on word-frequency: so they’d count up how often these words showed up in their library of authors’ works, and the ones that were rarer across the corpus would be more vivid. These rarity metrics would be mapped to scores between 0 and 10.</li></ol><p>For <em>sentiment</em> analysis, the analytical technique is much the same, except instead of “vivid” words you’re instead tracking words with positive and negative valence—and the average valence for a block of text is its sentiment.</p><p>Again, none of this exploits authors or makes it harder for them to make a living. The words are all ground into a homogenous paste and the software only looks at counts and frequencies—there’s nothing “stolen” here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZmaMf26yAlMgsGQCVHbLfQ.jpeg" /><figcaption>Pictured: crimes against humanity, apparently. Photo by <a href="https://unsplash.com/@amadorloureiro?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Amador Loureiro</a> on <a href="https://unsplash.com/photos/BVyNlchWqzs?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Determining that the letter “E” is the most frequently used letter in the English language doesn’t demand consent from every single person who ever picked up a pen—and this kind of statistical analysis certainly doesn’t require buy-in from or remuneration to authors in this text corpus.</p><p>Would you really charge someone if they asked you how many times you use the words “tequila” or “underpants” in your sentences? I doubt it.</p><h4>Linguistic percentiles</h4><p>This is a meta-feature that works on top of the other features delivered by ProseCraft and Shaxpir—and tells you how a certain metric compares with the rest of the library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*FoFsPk5ACd8sQowOf7SAGw.png" /></figure><p>This puts a work in rank-order based on some metric, and then tells you how it placed.</p><p>That’s it.</p><p>There’s nothing harmful here.</p><p>These authors boiled themselves up into a tizzy over next-to-nothing, and then ruined some dude’s day over it because he smelled vaguely tech-adjacent.</p><h3>Goliaths playing at David</h3><p>The thing that pisses me off most about this whole affair is how sneering and sanctimonious the offending authors were while engaging in this absolutely unfounded crusade.</p><p>They came into the situation with an attitude like <em>they</em> were victims, and it was <em>they </em>who were rising up against some sort of powerful oppressor.</p><p>Meanwhile, casual observers would note that:</p><ul><li>Benji Smith, the indie creator of Shaxpir, had less than two thousand followers on Twitter and likely even fewer users of his product, which seemed to have been inactive for several years.</li><li>The authors that dogpiled him were people like <a href="https://web.archive.org/web/20230810183927/https://twitter.com/jeffvandermeer/status/1688630051149881345">Jeff VanderMeer</a>—who has a fucking Hollywood movie made from his books, with around 70,000 Twitter followers—and <a href="https://web.archive.org/web/20230810053253/https://twitter.com/brockway_llc/status/1688661800554733569">Robert Brockway</a>, a Cracked-writer turned novelist with 22,000 followers. These people are, compared to Benji, <em>titans.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/0*N11amRYxiMULJlWZ.jpg" /><figcaption>ha ha ha</figcaption></figure><p>But the way they speak makes it sound like they just had some kind of world-changing revolution against an empire. Look at this silly nonsense:</p><h3>Gabino Iglesias on Twitter: &quot;Prosecraft is no more. Why? Because writers got pissed. Because we won&#39;t take shit and let our work be fed into machines. The fight is just starting, but we&#39;re in this for the long haul. (Not gonna debate AI with anyone, so save your &quot;it&#39;s just like using a calculator&quot; comments) pic.twitter.com/TFrXIk0jHA / Twitter&quot;</h3><p>Prosecraft is no more. Why? Because writers got pissed. Because we won&#39;t take shit and let our work be fed into machines. The fight is just starting, but we&#39;re in this for the long haul.</p><p>Every single one of these “revolutionaries” is hyping themselves up thinking that they just went up against The Man and won—</p><p>But guess what, you self-righteous fucks?</p><p>You <em>are</em> The Man.</p><h3>🐣 kabir on Twitter: &quot;Because I&#39;m petty and spiteful, I&#39;ve created a generative AI trained solely on the text works of every author who jumped onto this dogpile of ProseCraft.Find it now at https://t.co/Ckj9kpDivf - enjoy https://t.co/7pZTZI9Y3b / Twitter&quot;</h3><p>Because I&#39;m petty and spiteful, I&#39;ve created a generative AI trained solely on the text works of every author who jumped onto this dogpile of ProseCraft.Find it now at https://t.co/Ckj9kpDivf - enjoy https://t.co/7pZTZI9Y3b</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b8643188ffb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automatic Funnels with Semantic Logging]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://levelup.gitconnected.com/automatic-funnels-with-semantic-logging-5dd8126b0f74?source=rss-95dd06d590c5------2"><img src="https://cdn-images-1.medium.com/max/600/1*LEaIaiSEV_lplKDal5KeEg.png" width="600"></a></p><p class="medium-feed-snippet">Never hand-write a funnel query again</p><p class="medium-feed-link"><a href="https://levelup.gitconnected.com/automatic-funnels-with-semantic-logging-5dd8126b0f74?source=rss-95dd06d590c5------2">Continue reading on Level Up Coding »</a></p></div>]]></description>
            <link>https://levelup.gitconnected.com/automatic-funnels-with-semantic-logging-5dd8126b0f74?source=rss-95dd06d590c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dd8126b0f74</guid>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Naim Kabir]]></dc:creator>
            <pubDate>Mon, 16 Jan 2023 02:02:28 GMT</pubDate>
            <atom:updated>2023-01-16T02:02:28.781Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Occam’s Deepest Cut]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://naim-kabir.medium.com/occams-deepest-cut-483162ebbe6a?source=rss-95dd06d590c5------2"><img src="https://cdn-images-1.medium.com/max/1016/1*gBOY4f0I3McZgygX_rjRYQ.png" width="1016"></a></p><p class="medium-feed-snippet">The razor doesn&#x2019;t just point at truth: it defines it</p><p class="medium-feed-link"><a href="https://naim-kabir.medium.com/occams-deepest-cut-483162ebbe6a?source=rss-95dd06d590c5------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://naim-kabir.medium.com/occams-deepest-cut-483162ebbe6a?source=rss-95dd06d590c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/483162ebbe6a</guid>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[science]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[astronomy]]></category>
            <dc:creator><![CDATA[Naim Kabir]]></dc:creator>
            <pubDate>Fri, 06 Jan 2023 17:10:35 GMT</pubDate>
            <atom:updated>2023-01-06T17:10:35.949Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Are Large Language Models Sentient?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://levelup.gitconnected.com/are-large-language-models-sentient-d11b18ef0a0a?source=rss-95dd06d590c5------2"><img src="https://cdn-images-1.medium.com/max/2600/1*O-_tuMMJuYIeIcRx-232Aw.jpeg" width="4335"></a></p><p class="medium-feed-snippet">On why the question is not worth asking</p><p class="medium-feed-link"><a href="https://levelup.gitconnected.com/are-large-language-models-sentient-d11b18ef0a0a?source=rss-95dd06d590c5------2">Continue reading on Level Up Coding »</a></p></div>]]></description>
            <link>https://levelup.gitconnected.com/are-large-language-models-sentient-d11b18ef0a0a?source=rss-95dd06d590c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d11b18ef0a0a</guid>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[philosophy-of-mind]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ethics]]></category>
            <dc:creator><![CDATA[Naim Kabir]]></dc:creator>
            <pubDate>Mon, 13 Jun 2022 01:34:10 GMT</pubDate>
            <atom:updated>2022-06-19T00:33:50.509Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Continuous Deploys With Bazel + Github Actions]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://levelup.gitconnected.com/continuous-deploys-with-bazel-github-actions-c508676678e8?source=rss-95dd06d590c5------2"><img src="https://cdn-images-1.medium.com/max/2600/1*KqZ0foonHNLKRqYsbhLcxw.jpeg" width="5098"></a></p><p class="medium-feed-snippet">CI/CD directly from your repo</p><p class="medium-feed-link"><a href="https://levelup.gitconnected.com/continuous-deploys-with-bazel-github-actions-c508676678e8?source=rss-95dd06d590c5------2">Continue reading on Level Up Coding »</a></p></div>]]></description>
            <link>https://levelup.gitconnected.com/continuous-deploys-with-bazel-github-actions-c508676678e8?source=rss-95dd06d590c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/c508676678e8</guid>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Naim Kabir]]></dc:creator>
            <pubDate>Sun, 13 Feb 2022 22:29:26 GMT</pubDate>
            <atom:updated>2022-02-13T22:29:26.414Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Jinja + SQL = ❤️]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/data-science/jinja-sql-%EF%B8%8F-7e4dff8d8778?source=rss-95dd06d590c5------2"><img src="https://cdn-images-1.medium.com/max/1280/1*tuN2mgBxRvevoIf9QyHiLQ.png" width="1280"></a></p><p class="medium-feed-snippet">Macros for maintainable, testable data analytics</p><p class="medium-feed-link"><a href="https://medium.com/data-science/jinja-sql-%EF%B8%8F-7e4dff8d8778?source=rss-95dd06d590c5------2">Continue reading on TDS Archive »</a></p></div>]]></description>
            <link>https://medium.com/data-science/jinja-sql-%EF%B8%8F-7e4dff8d8778?source=rss-95dd06d590c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e4dff8d8778</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Naim Kabir]]></dc:creator>
            <pubDate>Sun, 15 Aug 2021 16:11:27 GMT</pubDate>
            <atom:updated>2021-08-15T16:11:27.815Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Causal Inference For Fun And Profit]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/data-science/causal-inference-for-fun-and-profit-cb5f38601a5d?source=rss-95dd06d590c5------2"><img src="https://cdn-images-1.medium.com/max/1920/1*61HXzPEtxSpAIlN4WXLfYg.jpeg" width="1920"></a></p><p class="medium-feed-snippet">The struggles of science at a fast-moving startup</p><p class="medium-feed-link"><a href="https://medium.com/data-science/causal-inference-for-fun-and-profit-cb5f38601a5d?source=rss-95dd06d590c5------2">Continue reading on TDS Archive »</a></p></div>]]></description>
            <link>https://medium.com/data-science/causal-inference-for-fun-and-profit-cb5f38601a5d?source=rss-95dd06d590c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb5f38601a5d</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[deep-dives]]></category>
            <category><![CDATA[office-hours]]></category>
            <dc:creator><![CDATA[Naim Kabir]]></dc:creator>
            <pubDate>Wed, 07 Apr 2021 20:09:31 GMT</pubDate>
            <atom:updated>2021-04-26T04:46:31.660Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[A Pattern-Recognition Critique Of Dr. Shiva Ayyadurai]]></title>
            <link>https://naim-kabir.medium.com/dr-shiva-ayyadurai-doubles-down-on-his-con-7ba25b09b05c?source=rss-95dd06d590c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ba25b09b05c</guid>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[comedy]]></category>
            <category><![CDATA[elections]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Naim Kabir]]></dc:creator>
            <pubDate>Tue, 17 Nov 2020 06:04:01 GMT</pubDate>
            <atom:updated>2020-11-19T05:18:32.453Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="People who watched the video will get the joke" src="https://cdn-images-1.medium.com/max/1024/1*_PkQNsMFtk8lOR5iwu-P6A.png" /></figure><h3>A Pattern-Recognition Critique of Dr. Shiva Ayyadurai</h3><h4>Election fraud in Michigan? Nope, just a huckster</h4><p><a href="https://en.wikipedia.org/wiki/Shiva_Ayyadurai">Dr. Shiva Ayyadurai</a> is doubling down on a video which I <a href="https://kabir-naim.medium.com/dr-shiva-ayyadurai-the-danger-of-data-charlatans-4f675ffe793c">poked holes</a> in a few days ago. In it, he claimed that Joe Biden stole more than 60,000 votes in Michigan. It involved poor mathematics, and folks like Matt Parker of <a href="https://www.youtube.com/watch?v=aokNwKx7gM8">StandupMaths</a> drew similar conclusions.</p><p>Stanford Ph.D and director of MIT’s Election Lab, <a href="https://polisci.mit.edu/files/ps/imce/faculty/cv/2020%20Stewart%20CV%20October.pdf">Charles Stewart III</a>, happens to agree with us.</p><h3></h3><p>Interested in the Dr. Shiva nonsense about an algorithm flipping votes in MI? Post by @kabircreates is pretty good on one of the math flaws. My additional issue is that you can&#39;t reproduce his graphs using the precinct returns on the Oakland website.https://t.co/zFv21WkjPP</p><p>In this new video, Ayyadurai dismisses math-based criticisms by saying that detecting election-fraud is “not a math problem, but a pattern-recognition problem.”</p><p>Luckily, pattern recognition is my main discipline and the basis for my professional career — starting at the <a href="https://en.wikipedia.org/wiki/University_of_Pennsylvania">University of Pennsylvania</a> where I learned how to detect seizures from ECOG data in <a href="https://littlab.seas.upenn.edu/education-outreach/courses/">BE521</a>, developing during <a href="https://www.sbir.gov/">SBIR and STTR</a> grant research for the Navy while at <a href="https://www.sbir.gov/sbc/commonwealth-computer-research-inc">Commonwealth Computer Research, Inc</a>, and finally coming into full form at a <a href="https://www.even.com/">fin-tech start-up</a> focusing on enhancing employee financial health.</p><p>So. We can talk about what he gets wrong, here.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FR8xb6qJKJqU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DR8xb6qJKJqU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FR8xb6qJKJqU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/975dee47f84aa6057e3cb58b93bde801/href">https://medium.com/media/975dee47f84aa6057e3cb58b93bde801/href</a></iframe><p>First I want to start by just noting inconsistencies, though, because it doesn’t take an expert in pattern recognition to recognize when someone declares one thing and then says something completely contradictory. Let’s go for it.</p><h3>Inconsistencies</h3><h4>Composite Curves, Are They Normal Or Bad?</h4><p>Recall, in the last video, the kinked curve in Ayyadurai’s graphs were a reason for alarm. He pointed at the bend in the curve and said, aha, this must be where the voting machines’ anti-Trump algorithm kicked in! Clear alarm signal!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JnHDP9BYvsbeMSJRA0JtPQ.png" /><figcaption><a href="https://youtu.be/Ztu5Y5obWPk?t=1912">31:52</a> — “For some reason, right at 20%, it looks like his vote count starts getting linearly reduced.”</figcaption></figure><p>He goes as far as to say that some kind of <a href="https://www.youtube.com/watch?v=Ztu5Y5obWPk&amp;feature=youtu.be&amp;t=2345">transistor function or ramp function is at work (39:05)</a>, an algorithm deep in Diebold-esque vote tabulation machines.</p><p>Yet in the new video, he says that combined flat and sloped curves are the surefire feature of a “normal” election.</p><p>Which one is it? You can’t have it both ways.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wMvy8z-7GOPactnQblu1xQ.png" /><figcaption><a href="https://youtu.be/R8xb6qJKJqU?t=3376">56:16</a></figcaption></figure><h4>Wayne county: was there cheating or not?</h4><p>This is my favorite graph in all of Ayyadurai’s presentations. It’s the slide of Wayne County, which he flashes again in his new video:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XFlfrzlTKTsEDi1m.png" /><figcaption><a href="https://youtu.be/R8xb6qJKJqU?t=3540">59:00</a></figcaption></figure><p>He shows it’s a flattish trend-line and the slide still says there was “no cheating.” But this certainly isn’t a “normal” composite curve, so there must be cheating according to his rule above, no?</p><p>That’s not even the best part, though. In this county where there was “no algorithm detected”, I’ve circled in yellow some points that cannot possibly exist. Remember that Dr. Shiva is plotting (% split-ticket Trump votes﹣% straight-ticket Republican votes) on the Y-axis, and % straight-ticket Republican votes on the X-axis.</p><p>If you look, there are points at approximately (X: 4%, Y: -20%), or (X: 2%, Y: -10%), etc. Those data-points would imply that Trump got <em>negative</em> split-ticket votes at those precincts. e.g if <strong>-20 = SplitTrump</strong>﹣<strong>4</strong>; SplitTrump must be -16.</p><p>That would be a surefire piece of evidence that there was cheating, since you can’t have negative votes — but of all the counties he plots for us, this is the <em>only</em> one where there was “no cheating algorithm detected”.</p><p>At this point I’m like 30% sure he’s just trolling, and that this is him at peak comedy. But really it just means you can’t trust his plots, because clearly he shows fake data.</p><h4>Are flat lines good? Or are they signs of fraud?</h4><p>In the last video, Dr. Shiva Ayyadurai set the expectation that a flat line in his graphs should be a signal of normalcy. He plotted it in the case where sentiment towards Trump was about even with the Republican Party:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Fr9DuY4vUdWN0g_UqsGZQ.png" /><figcaption><a href="https://youtu.be/Ztu5Y5obWPk?t=1327">22:07</a></figcaption></figure><p>In response to a comment from Mitt Romney saying we should expect poor sentiment towards Trump from lifelong Republicans, Ayyadurai then posits <em>this </em>“normal” graph:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XXzKkavvKdh4a5Vo5z01OA.png" /><figcaption><a href="https://youtu.be/Ztu5Y5obWPk?t=2685">44:45</a> — “For example, Mitt Romney would and he has said this — ‘the pattern make sense’ he would say, ‘since Republicans stay Republican but no longer like Trump, this could be true, right?’”. Ayyadurai goes on to say: “Well if that were true, what would you see? You would see this!”</figcaption></figure><p>This graph <em>should</em> be alarming, because it also has an impossible point on it. On the far left you have one that’s approximately (X: 5, Y: -8) — which would imply it’s “normal” for you to observe -3% split-ticket voting percentages for Trump.</p><p>Anywho, besides being inconsistent with itself, it’s inconsistent with what he says in his new video — where he expects a composite curve in the usual case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wMvy8z-7GOPactnQblu1xQ.png" /><figcaption><a href="https://youtu.be/R8xb6qJKJqU?t=3376">56:16</a></figcaption></figure><h3>Feature Engineering</h3><p>Let’s talk a little bit about feature engineering. In this video Ayyadurai touches a lot on how important it is to extract information-dense bits of signal from inputs — and this is correct. The majority of a professional machine learning engineer’s job will mostly involve milling raw data into derived features that will correlate well with a final inferred output — in Ayyadurai’s case, that’s “Election Fraud” or “No Election Fraud”.</p><p>Ayyadurai’s defense against Matt Parker’s criticism that <a href="https://www.youtube.com/watch?v=aokNwKx7gM8&amp;feature=youtu.be&amp;t=770">subtracting two percentages doesn’t have any meaning</a> is: it doesn’t have to mean anything mathematically, it just needs to be a good correlate for distinguishing “Election Fraud” from “No Election Fraud”. He says this is more of an art than it is just mathematics.</p><p>It’s true that feature engineering takes creativity, intuition, and artfulness, but it always does come back to down to mathematics — and we’ll see how in a second.</p><p>But first let’s get a sense of what Ayyadurai considers important features:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*9c9GxG9cWM0smipFx2Dctg.png" /></figure><p>He mentions just the two here, but it’s enough to critique. Some criticisms:</p><h4>Features shouldn’t be correlated with each other</h4><p>Generally, features you use for a machine learning model shouldn’t be correlated. It’s hard to tell without knowing what downstream statistical model you’re using — since some won’t care, like <a href="https://en.wikipedia.org/wiki/Decision_tree_learning">decision trees</a> and all the ensemble variations of decision trees—but at worst it’ll screw up your models and at best it just won’t be helpful.</p><p>It’s particularly harmful for understanding your <a href="https://en.wikipedia.org/wiki/General_linear_model">multivariate linear regression</a> models, where you make an assumption that there is no <a href="https://en.wikipedia.org/wiki/Multicollinearity">multicollinearity</a>.</p><p>In this case, one of Ayyadurai’s features (2) is used as a term in another one of his features (1), meaning they are destined to be correlated. This is that big ol’ mean ol’ math criticism Shiva doesn’t like coming back to haunt him, here.</p><p>Shiva mentions clustering data in his presentation as well. Correlated features can lead to problems with clustering, since it will warp and skew your feature-space so things aren’t as nicely separable. It’d be like plotting points in a Cartesian space where the axes weren’t at right angles to each other, and then trying to distinguish clusters of points.</p><p>Speaking of clustering, though —</p><h4>What are you even going to cluster?</h4><p>In the stated research aims of Ayyadurai’s project, clustering is Aim 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wnjoM8bFIRgyxFff6jJfGw.png" /></figure><p>Clustering is where you take your set of data-points and plot them in feature-space (the space where each feature is one of your axes) — and you split them into distinct groups, where each group has its own label. In Ayyadurai’s problem, each label should presumably be “Election Fraud” or “No Election Fraud”.</p><p>Below is an example of some points in feature-space being clustered into three classes by the <a href="https://en.wikipedia.org/wiki/K-means_clustering">K-means algorithm</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/0*Buzzc8U_WiytE6O2.gif" /><figcaption>Clustering via K-Means. Source: <a href="https://commons.wikimedia.org/wiki/User:Chire">Chire</a>, Wikipedia</figcaption></figure><p>But here’s what Ayyadurai’s plots look like in his feature-space:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mdq1pnoGQCnAtRDJ.png" /></figure><p>What clusters would you even make here, and what would they mean?</p><p>A deeper issue: the points in his feature-space are <em>precincts</em>. What he’s proposing is that his features are able to distinguish between fraud and no-fraud at the precinct level, but in every single one of his talks he mentions fraud being a property of a <em>county</em>, not a precinct.</p><p>Which leads me to—</p><h4>Ayyadurai doesn’t know what a feature is</h4><p>For a lad who took the first 20 minutes of the whole video fawning over his own accolades in pattern recognition, he sure does seem to be confused.</p><p>A <a href="https://en.wikipedia.org/wiki/Feature_(machine_learning)">feature</a> is a property of the object that can be discriminated into its different classes (or regressed onto a continuous value). In Ayyadurai’s case, that object is a county. He’s always talked about counties as having fraudulent elections or not, and has never made claims that he’s been detecting fraud at individual precincts.</p><p>This leads me to believe that what he calls a “signal” is what he actually means as his feature, and what he calls a “feature” is a sub-component used to derive that feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2F22z0AnVbSVzI7MzalBcA.png" /></figure><p>So really, his feature is the polynomial degree of the curve he’s plotting, on a county-by-county basis.</p><p>A degree of 1 (a line) is bad, and a degree of &gt;1 is good, according to this slide. I don’t know if he just mixed up terms because he was running on low sleep or something— but I suspect he was just desperately trying to save face by trying to play off his choice of <em>(% split-ticket Trump votes﹣% straight-ticket Republican votes) </em>as an “artful feature choice” rather than a mistake/deceit he and his team made.</p><p>So there you have it. A small taste of a <em>pattern recognition person</em>’s critique of Dr. Shiva Ayyadurai MIT Ph.D, B.S.E.E, M.S.V.S, M.S.E.E.</p><p><strong>A recommendation:</strong> you probably shouldn’t trust this guy, since he seems to just be using techno-babble to push an agenda. It is your American right to put political pressure on your Secretary of State to ensure that we have free and fair elections via audits/recounts/hand-counts, etc., but lending your support to scam artists like this who just rile up conflict via disinformation is not the way to do it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ba25b09b05c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Fraud Of Dr. Shiva Ayyadurai: Oakland County, Michigan]]></title>
            <link>https://naim-kabir.medium.com/the-fraud-of-dr-shiva-ayyadurai-oakland-county-michigan-1bc51bcebf1b?source=rss-95dd06d590c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/1bc51bcebf1b</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[election-2020]]></category>
            <dc:creator><![CDATA[Naim Kabir]]></dc:creator>
            <pubDate>Sun, 15 Nov 2020 01:29:07 GMT</pubDate>
            <atom:updated>2020-11-18T02:50:24.494Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kh5jyZxdEgFeHoQxsWJbVw.png" /></figure><h4>Election Fraud in Michigan? Nope, just being misleading with data.</h4><p>A few days ago, <a href="https://en.wikipedia.org/wiki/Shiva_Ayyadurai">Dr. Shiva Ayyadurai</a> posted a video that claimed to prove election fraud in Michigan. He is wrong, and I’ll show you how <strong>using data from Oakland County, Michigan</strong>. My code and data sources are public and replicable — and everything I write is open for comment and discussion.</p><p>Previously, I posted <a href="https://kabir-naim.medium.com/dr-shiva-ayyadurai-the-danger-of-data-charlatans-4f675ffe793c">a detailed takedown</a> of how his analysis was a mathematical parlor trick — which he uses to generate a “suspicious” result that’s supposed to prove that Biden stole 60,000+ votes from Trump.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4lEhEJau4LH_CJWU.png" /><figcaption>According to Ayyadurai, this downward sloping line is proof that Biden stole votes from Trump. He is incorrect.</figcaption></figure><p>But many people aren’t convinced by theory or abstraction, so I figured the best proof would be to play that parlor trick myself: this time “proving” that Trump stole votes from Biden. To be clear, this isn’t a proof of anything. It’s a trick.</p><p>To demonstrate this, I will use election data from Oakland County, Michigan.</p><h3>Recap of Ayyadurai’s Thesis</h3><p>Before we do any work, let’s recap what Ayyadurai is doing.</p><p>The dataset Ayyadurai works with contains:</p><ul><li>Precinct-level % of Republican voters among straight-ticket voters.</li><li>Precinct-level % of Trump votes among split-ticket voters. These are what he calls “Individual Candidate Voters”, people who did not select a party’s “straight-ticket” option on their ballot.</li></ul><p>The main quantity Ayyadurai is concerned with is: the % of Trump votes among split-ticket voters MINUS the % of Republicans among straight-ticket votes in a precinct.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JWC7XjZM3iP24xe9.png" /></figure><p>He finds it very suspicious that the quantity that he’s plotting has a negative slope, and sees that as evidence that there is foul play. He accuses Michigan of using the Dominion voting machine’s weighted race feature to do this, creating a linear pattern which he notes as suspicious and telling of algorithmic tampering.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vAeGg54ZEhBZROBm.png" /><figcaption>Ayyadurai’s “smoking gun”. It’s… not.</figcaption></figure><p>What I’ll show you is that you’d get that same negative slope if you flip the Party in question and instead use:</p><ul><li>Precinct-level % of Democrat voters among straight-ticket voters.</li><li>Precinct-level % of Biden votes among split-ticket voters.</li></ul><h3>Getting Data</h3><p>To grab the data, I visited the <a href="https://www.oakgov.com/clerkrod/elections/Pages/default.aspx">Oakland County site</a> and went to the unofficial election results for November, which routed me to this <a href="https://results.enr.clarityelections.com/MI/Oakland/105840/web.264614/#/summary">data source</a>. Here I downloaded their XML data and got to work formatting it into something workable.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ce94dd199bf0176b3c1fab286c05fa27/href">https://medium.com/media/ce94dd199bf0176b3c1fab286c05fa27/href</a></iframe><p>Great, now we can obtain those quantities we care about:</p><ul><li>Precinct-level % of Democrat voters among straight-ticket voters.</li><li>Precinct-level % of Biden votes among split-ticket voters.</li></ul><p>An important note is: to isolate split-ticket vote counts towards Presidential candidates, you have to subtract the straight-ticket votes towards them. This isn’t perfect since straight-ticket voters can “defect” — but Ayyadurai assumes that straight-ticket voters all vote for their Presidential candidate in his video, so I’ll do the same.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/471c16cc5d8f8833a839d301514caea8/href">https://medium.com/media/471c16cc5d8f8833a839d301514caea8/href</a></iframe><h3>The Parlor Trick</h3><p>Let’s now plot the quantities Ayyadurai does. On the Y-axis is a <em>difference</em>: the % split-ticket votes for Biden MINUS the % straight-ticket Democrat votes. On the X-axis: just the % straight-ticket Democrat votes.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9bd06ae006041eab714558f20e4df6d0/href">https://medium.com/media/9bd06ae006041eab714558f20e4df6d0/href</a></iframe><p>A negative slope — what do you know. Does that mean Trump was stealing votes from Biden?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*gdFEsZlGphIBjv9cgSvRuw.png" /></figure><p>Of course not. It just means Ayyadurai’s a hack.</p><h3>The Parlor Trick, In Reverse</h3><p>Just so you can see my code is consistent with what Ayyadurai’s doing, here I plot the same quantities, in favor of Trump. So that’d be exactly what he prescribes here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wIjTAqARAHqm85cH.png" /></figure><p>I do that below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9b6f81cf27b97099cbe7dc01e6dde3fa/href">https://medium.com/media/9b6f81cf27b97099cbe7dc01e6dde3fa/href</a></iframe><p>Also a negative slope.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*Yg7i_XCDtm30J0Sk2VjNQQ.png" /></figure><p>By design. For details on how this result is pretty much inevitable regardless of your dataset, dig into my <a href="https://kabir-naim.medium.com/dr-shiva-ayyadurai-the-danger-of-data-charlatans-4f675ffe793c">previous work</a>.</p><p>TL;DR: Ayyadurai says we should expect a flat line in the plots above, and there is only <em>one</em> case that will lead to a flat-line. It would happen only if the slope of the correlation between % of split-ticket votes for Trump and % of straight-ticket Republican votes is exactly 1. We have the data at hand, so I can show you that the true slope is actually more like 0.6.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/44793254bbefb6dcd36af0f5228d476d/href">https://medium.com/media/44793254bbefb6dcd36af0f5228d476d/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*KZxBmHMMWFwSTDaoTPBF-Q.png" /></figure><p>Since the slope of that trend-line isn’t ≥1, we’d <em>always</em> expect a negative slope in Ayyadurai’s plots. If it were &gt; 1, then we’d expect a <em>positive</em> slope in Ayyadurai’s plots — which is still not evidence of fraud. It’s just… how lines work.</p><p>Don’t let this dude fool you — he thinks we’re all rubes to be used for his own personal gain. Buck him off.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bc51bcebf1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dr. Shiva Ayyadurai & The Danger Of Data Charlatans]]></title>
            <link>https://naim-kabir.medium.com/dr-shiva-ayyadurai-the-danger-of-data-charlatans-4f675ffe793c?source=rss-95dd06d590c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f675ffe793c</guid>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[news]]></category>
            <category><![CDATA[election-2020]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[politics]]></category>
            <dc:creator><![CDATA[Naim Kabir]]></dc:creator>
            <pubDate>Wed, 11 Nov 2020 17:48:35 GMT</pubDate>
            <atom:updated>2020-11-18T05:52:07.909Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*htbuRUTmDME8eLZtvS3CuA.png" /></figure><h4>Election Fraud in Michigan? Nope: just how lines work</h4><p><strong>NOTE: On Nov. 16th, Ayyadurai </strong><a href="https://kabir-naim.medium.com/dr-shiva-ayyadurai-doubles-down-on-his-con-7ba25b09b05c"><strong>doubled down</strong></a><strong> on his misleading analyses.</strong></p><p>On November 10th, <a href="https://en.wikipedia.org/wiki/Shiva_Ayyadurai">Dr. Shiva Ayyadurai</a> posted a video claiming that some simple analytics revealed election fraud in Michigan. It received more than 200,000 views, and claims that Joe Biden stole more than 60,000 votes in Michigan.</p><p>The main thrust of his analysis is a mathematical parlor trick. In a <a href="https://kabir-naim.medium.com/the-fraud-of-dr-shiva-ayyadurai-oakland-county-michigan-1bc51bcebf1b">separate post</a>, I play that parlor trick myself with Oakland County data to “prove” the opposite conclusion — showing that his analysis is bogus at its core.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FZtu5Y5obWPk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZtu5Y5obWPk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FZtu5Y5obWPk%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/024321af0c98f2fdb361b35de89da5e8/href">https://medium.com/media/024321af0c98f2fdb361b35de89da5e8/href</a></iframe><p>I rarely pick on people for making analytical mistakes, because it happens to everyone and every instance is a lesson to learn from. But in this case it seems less like a mistake and more like an intentional deception — and you’ll see that the audacity of it is astounding. The man’s trying to fool us into believing in election fraud by taking advantage of <em>how lines work</em>. Bold move. Let’s see how it goes.</p><h3>The Data</h3><p>The dataset Ayyadurai works with contains:</p><ul><li>Precinct-level % of Republican voters among straight-ticket voters.</li><li>Precinct-level % of Trump votes among split-ticket voters. These are what he calls “Individual Candidate Voters”, people who did not select a party’s “straight-ticket” option on their ballot.</li></ul><p>The main quantity Ayyadurai is concerned with is: the % of Trump votes among split-ticket voters MINUS the % of Republicans among straight-ticket votes in a precinct.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F48BNtJ4cm0FOBIPxxkbFw.png" /><figcaption>His slide describing the quantities he’s plotting</figcaption></figure><p>He shows that the higher the percentage of Republican voters in a precinct, the more negative this difference is. He speciously says that this is an indicator of how much more popular Trump is among split-ticket voters than Republican candidates, and that it’s strange for it to be more negative in more Republican precincts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ssxV8nCLxjMrKPce0CR0PQ.png" /><figcaption>Example plot: negative linear correlation between % of Republican voters in a precinct vs. the (% Trump votes from split-ticket voters - % straight-ticket Republican voters).</figcaption></figure><p>According to the good doctor, the pattern you’d <em>expect</em> if there was just normal negative sentiment towards Trump is this flat line:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jqFu4XBa7Beud2lPK-HGwA.png" /><figcaption>You… actually wouldn’t expect this at all</figcaption></figure><p>To Dr. Shiva, this discrepancy is evidence of algorithmic foul play. To him, the negatively sloped line we see is a clear sign that the state of Michigan used the “weighted race” voting feature of vote-tallying machines to steal votes from Trump and grant them to Biden.</p><p>The thing is, that you’d <em>always</em> expect the negatively sloping line that he describes as “suspicious”, by definition. Think about what he’s plotting. On the X-axis is the % of straight-ticket Republican voters. On the Y-axis is the % of split-ticket Trump voters MINUS the % of straight-ticket Republican voters.</p><p>If we were to draw the equation for that line, it’d be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*OwYXMzM0_3lS7O342FdSeg.png" /><figcaption>Where the X-axis is % straight-ticket Republican votes, and the % of split-ticket Trump votes is some <a href="https://www.investopedia.com/terms/r/random-variable.asp#:~:text=Key%20Takeaways-,A%20random%20variable%20is%20a%20variable%20whose%20value%20is%20unknown,value%20in%20a%20continuous%20range).">Random Variable</a>. I’m representing the quantity Ayyadurai plots in his video: (the % of split-ticket Trump voters MINUS the % of straight-ticket Republican voters)</figcaption></figure><p>If you remember your <a href="https://www.mathsisfun.com/equation_of_line.html">formulas for lines</a>, you’ll know that this is by construction biasing us to get a line that will slope down 1:1, at 45-degrees. Regardless of the actual split-ticket vote data and how it’s distributed, the quantity Ayyadurai’s plotting is rigged to look like a negatively sloping line from the outset.</p><p>A thought exercise: assume that nobody on a split-ticket ever votes for the major two parties, and they all go third-party like true independents. What would you expect from Ayyadurai’s curve? It would just go down and to the right, by design.</p><p>And if a dude is artificially constructing a negatively sloped line in front of your eyes and telling you that this “beautiful, too-perfect line!” is evidence of election fraud, you should run the other way. Because he’s trying to take advantage of your good intentions.</p><p>Again, here’s the slide where he describes what he’s plotting. It is, from the beginning, set up to create a line of negative slope, since <em>its Y-axis includes a negated term from the X-axis.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F48BNtJ4cm0FOBIPxxkbFw.png" /><figcaption>When your Y-axis involves a term from your X-axis, you’re gonna have a bad time. Image source: A charlatan who’s trying to pull one over on us</figcaption></figure><p>If you’re more comfortable with statistical simulations of split-ticket voter data than with this algebra, then let’s dig into some code and some details, as well as answers to some common challenges.</p><p>If you don’t like theory/simulations at all and instead want to look at real data, <a href="https://kabir-naim.medium.com/the-fraud-of-dr-shiva-ayyadurai-oakland-county-michigan-1bc51bcebf1b">I do that here</a>.</p><h3>How Ayyadurai Is Misleading You, In Detail</h3><p>We’re gonna keep this as simple as possible. Let’s say that each precinct has two main populations of people: people who vote with a straight-ticket ballot and people who do a split-ticket vote. Ayyadurai himself frames these as two distinct populations, so I’m rolling with that premise here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_uTe9tFuZYRgXuM-LcF4_g.png" /><figcaption>Example from his slides</figcaption></figure><p>We can focus on percentages of Republican voters among straight-ticket ballots, and percentages of Trump votes among split-ticket ballots (or “Individual Candidate” votes, as he describes). We’re dropping out other voter groups because Ayyadurai doesn’t address them in his analysis at all.</p><p>Now, some assumptions we’ll make before we start running some simulations:</p><ul><li>As Ayyadurai assumes: all Republicans who vote straight-ticket will vote for Trump.</li><li>Split-ticket voters, on the other hand, just have some random, non-zero chance of voting for Trump. We will assume this is a flat probability <em>for now </em>(but I show how my conclusions hold for almost <em>any</em> distribution of split-ticket votes, flat or otherwise, later in the article)<em>.</em></li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d5b798fd182dd6aacbde5f3c27670919/href">https://medium.com/media/d5b798fd182dd6aacbde5f3c27670919/href</a></iframe><p>We can now simulate the voting outcomes of several precincts. We can simulate the % of Republican straight-ticket voters with a simple uniform sampling.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3add5b843c50cc6a91fb372040e7a1ca/href">https://medium.com/media/3add5b843c50cc6a91fb372040e7a1ca/href</a></iframe><p>We can sample what split ticket voters would do by doing a series of weighted coin-flips, using their fixed probability of voting for Trump.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4b754fd3744468577143b59245629b33/href">https://medium.com/media/4b754fd3744468577143b59245629b33/href</a></iframe><p>And now we plot the difference between % straight-ticket Republican voters and % votes for Trump among split-ticket voters, just as Dr. Ayyadurai does:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/405294829c87f148d92036724c89d3ec/href">https://medium.com/media/405294829c87f148d92036724c89d3ec/href</a></iframe><p>Bam. It’s a line with a negative slope. Just like we actually observe in real life, in counties where we have a nice spread of precincts with different fractions of Republican voters. No evidence of fraud here — just a simple result of the values we decided to plot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*7hgh9g9a8WWpzAYT0AhVOw.png" /></figure><h3>So, what’s going on?</h3><p>Let’s look closely at what we’re doing.</p><p>We’re plotting the line where the Y variable is: (% split-ticket Trump votes MINUS % straight-ticket Republican votes). This is plotted against the X variable, the % of straight-ticket Republican votes.</p><p>We can decompose this into two lines:</p><p>One line we have is the % of split-ticket Trump votes on the Y axis, vs. the % of straight-ticket Republican votes on the X-axis. If split-ticket voters have a fixed probability of voting Trump that is independent of their precinct’s % of Republicans, this line should be flat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*clWaB2KMTYFsAzDultYumg.png" /></figure><p>On the other hand, the other line we have is the % of straight-ticket Republican votes vs. % straight-ticket Republican votes. Otherwise known as the line of unity: a perfectly correlated line, since we’re plotting the same thing on both axes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*WeSpktU-hwiAR5Vofir38w.png" /></figure><p>To recover Ayyadurai’s original line of (% split-ticket Trump votes MINUS % straight-ticket Republican votes) vs. % straight-ticket Republican votes, we can subtract our second line from our first line. Remember that subtracting a line is the same as the negating a line and adding it. The line of unity, negated, is this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*46RxhC_aLx9Bi42YwClSrA.png" /><figcaption>We’re adding a line that’s downward sloping and negative by construction. Obviously this will lead to a downward-sloping final result.</figcaption></figure><p>You can see how it’s obvious that we’ll get a negatively sloping line after doing this. The operation we are performing will produce a downward sloping line <em>by definition.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*1SKV4MtJ7TBoXF1HeeGyPg.png" /></figure><p>This dude must think that we were born yesterday. <em>Wow</em>. Again, the sheer audacity of this just kills me.</p><h3>What if the probability of split-ticket votes for Trump isn’t constant?</h3><p>Let’s present Ayyadurai’s argument in the strongest light. Here’s a common objection from respondents: why do we assume a flat probability of split-ticket vote percentages? What if the probability of split-ticket votes for Trump is linearly correlated with the % of straight-ticket Republican voters in a precinct?</p><p>Let’s indulge this. Let’s say that straight-ticket voters are the majority of a precinct, and so “Republicanism” or “Democraticness” leaks out into the split-ticket voting population and influences their decisions. In that case, we’re no longer subtracting a 1:1, 45 degree line from a constant, flat line.</p><p>However, we are subtracting the 1:1 line of unity from <em>some other line.</em></p><p>In the simulation below, I assume that the linear correlation between the % of split-ticket Trump votes and the % of straight-ticket Republican votes has a slope of 0.9.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2eece75bdf1995b14311ccd32311c039/href">https://medium.com/media/2eece75bdf1995b14311ccd32311c039/href</a></iframe><p>Here’s the component where I just plot % split-ticket Trump votes. This is no longer flat, because we’re saying there’s a correlation between split-ticket Trump votes and the “Republican-ness” of a precinct.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*FOT_wpPJpDgHyBfwuwa5uA.png" /></figure><p>Plotting the line of unity is the same:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*NWn6OVms5gEnOCGjetUX8w.png" /><figcaption><em>Perfectly correlated, by definition</em></figcaption></figure><p>And when you subtract the second from the first, you again get a negatively sloping line!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*zuM9KQEntvriHODten8DIw.png" /><figcaption>This gets even more interesting — but stil downsloping — when the correlation is NON-linear.</figcaption></figure><p>The only way you’d get the flat line — which Ayyadurai asserts is “expected” — is if the slope of the correlation between split-ticket Trump votes and straight-ticket Republican votes is <em>exactly 1:1</em>. No more, and no less. In every other case, you’d get a line with <em>some</em> slope.</p><p>In my <a href="https://kabir-naim.medium.com/the-fraud-of-dr-shiva-ayyadurai-oakland-county-michigan-1bc51bcebf1b">work with real data from Oakland County, MI</a> — I show you that this slope is far from 1. It’s far lower than my simulated 0.9, too: it’s just 0.6. We’d <em>always</em> expect Ayyadurai’s “suspicious” plunge, in this case. Biden also experiences this plunge — though it’d have been totally acceptable to see an upward sloping line in either case, too.</p><p>Again: not fraud. Just lines behaving like lines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*NiUAbS5rL1GJEGZMAqQRuA.png" /><figcaption>The actual slope of correlation is 0.6, so I was being pretty generous with my assumption of 0.9 earlier.</figcaption></figure><h3>Invite to Dr. Ayyadurai</h3><p>If this is truly what Dr. Ayyadurai meant to do, then it’s essentially just a mathematical trick. A lot of build-up and sleight-of hand for an inevitable and mundane result. It’s kinda like if I asked you to think of a number, add 5, subtract 8, and tell me the result. You shouldn’t be impressed if I could guess your number: all I have to do is add 3 to your result and I’ll know what you started with. In the same vein, Dr. Ayyadurai is conjuring a “suspicious” negatively sloped line from any data that you would likely start with.</p><p>You could do the same thing with straight-ticket Democrat votes and split-ticket votes for Biden. In fact, <a href="https://kabir-naim.medium.com/the-fraud-of-dr-shiva-ayyadurai-oakland-county-michigan-1bc51bcebf1b">I do so here</a>. Is that evidence that Trump is stealing votes from Biden? Of course not. It is crazy to me that Ayyadurai can put on a straight face and pitch this to us as evidence for conspiracy-level election fraud — he must think very little of us.</p><p>I know people are very quick to trust something just because it’s got some numbers on it — especially if it agrees with them — but numbers don’t make an analysis bulletproof. Not inspecting even the quant-iest of presentations can leave you vulnerable to a new breed of snake-oil salesman. Case in point: Dr. Shiva Ayyadurai. U.S. Senate Candidate.</p><p>That goes double for me, too. Inspect my argument carefully. If you see trouble, send me a rebuttal right here. Dr. Ayyadurai, that goes for you especially. I’ve answered a few responses below:</p><h4>Some good challenges from respondents so far:</h4><p><em>What about Wayne county? It doesn’t display this negative linear trend.</em></p><p>Correct, I should have addressed this in the main body of the article. I think the issue with Wayne is that there isn’t an even spread of precincts with a wide variety of %-Republican voters. He also zooms in on the X-axis, so we’re only looking from 0–30%, where the value he’s plotting is likelier to be positive. I dig into that case in this <a href="https://gist.github.com/NaimKabir/a796ec6d99efbfca865a5e5e465d44eb">Git Gist</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*okEpb-zOHOo8L5bC4ZOMvQ.png" /><figcaption>Simulation when I randomly generate precincts from a normal distribution, where the mean % of Republican voters is low. Looks more like a blob than a line. If you modify the code to also inject noise into precinct sizes, and zoom in on the X-axis, it looks more and more like the Wayne example.</figcaption></figure><p>One thing I do want to point out is that Ayyadurai’s graph of Wayne county shows impossible data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xOx8tVfW72aWJTU-DxGHFg.png" /><figcaption>I’d laugh if this weren’t sad.</figcaption></figure><p>If you look, there are points at approximately (X: 4%, Y: -20%), or (X: 2%, Y: -10%), etc. Those data-points would imply that Trump got <em>negative</em> split-ticket votes at those precincts. e.g if <strong>-20 = SplitTrump - 4</strong>; SplitTrump must be -16.</p><p>If these data were real you could argue that there was cheating in Wayne county, because negative votes should be impossible! Yet this is one of the few counties where Ayyadurai says “no algorithm detected”.</p><p>My sides. At this point we’re basically just watching a stand-up comedy special.</p><p><em>How do you explain the fact that Ayyadurai’s regression has two line-segments? That doesn’t agree with your thesis that there should be one negatively sloping line.</em></p><p>Dr. Ayyadurai plots this trend-line over his data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2T9qCqXYv7wrtBrTxHQqhQ.png" /></figure><p>But we could just as easily draw this line:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FUXaZYzFpsPO6x2Hpynahw.png" /></figure><p>The choices are arbitrary. The only way to rigorously tell which fit is better is to run the regressions on the data ourselves and see which model minimized the error more.</p><p>An important point: in model selection, the aim is always to follow Occam’s Razor and go with the most parsimonious model you can. If you just try and minimize error without controlling the complexity of your model, your “best” model will be a line wildly flitting from exact point to exact point. We call this <a href="https://www.investopedia.com/terms/o/overfitting.asp#:~:text=Overfitting%20is%20a%20modeling%20error,in%20the%20data%20under%20study.">overfitting</a>.</p><p>Oftentimes you’ll compare competing models with something like the <a href="https://en.wikipedia.org/wiki/Akaike_information_criterion">Akaike Information Criterion</a>, which punishes models that are more complicated than they need to be (models that have more parameters). Without looking at the raw data itself, I’d say a single regression line would certainly be a simpler model fit than trying to place two linear regressions in a piecewise model like he draws.</p><p>If the kink in the curve is real, it could also be due to a non-linear correlation of % straight-ticket Republican voters and % split-ticket Trump voters. A detailed treatment of how the line can be curvy is offered by <a href="https://ldi.upenn.edu/expert/kristian-lum-phd-msc">Dr. Lum</a> in <a href="https://youtu.be/fH0Z-8563-E?t=778">her video here</a>.</p><blockquote><strong><em>EDITED NOTE: </em></strong><em>Thanks to </em><a href="https://medium.com/@clarriba/even-after-editing-it-is-still-wrong-47db74913727"><em>Carlos Larriba Andaluz</em></a><em> and </em><a href="https://medium.com/@candysouth778"><em>Sam Nim</em></a><em> for pointing out a previous analysis’ axes that didn’t match the video’s exactly. Now they do. Generally: a big thank you to everyone who engaged via the responses and helped me sharpen my argument and get closer to the truth.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*L3I7_DjE2l9LX4mdeZzRbQ.png" /><figcaption>TL;DR</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f675ffe793c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>