<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Viswadutt Poduri</title>
<link>https://viswaduttp.github.io/</link>
<atom:link href="https://viswaduttp.github.io/index.xml" rel="self" type="application/rss+xml"/>
<description>Welcome to Viswadutt&#39;s Personal Page.</description>
<image>
<url>https://viswaduttp.github.io/images/default.png</url>
<title>Viswadutt Poduri</title>
<link>https://viswaduttp.github.io/</link>
<height>96</height>
<width>144</width>
</image>
<generator>quarto-1.9.38</generator>
<lastBuildDate>Sat, 02 May 2026 00:00:00 GMT</lastBuildDate>
<item>
  <title>Built a Shiny App with Posit AI</title>
  <dc:creator>Viswadutt Poduri</dc:creator>
  <link>https://viswaduttp.github.io/posts/built-shiny-app-posit-ai/</link>
  <description><![CDATA[ 





<p>I have been thinking of doing something with the SHRUG data by devdatalab from long time but couldn’t get time. Recent release of Posit AI assistant has been the nudge to do something with this data.</p>
<p>I downloaded the surface PM 2.5 data and called up the AI assistant to create a shiny App. I took quite a few prompts and some crucial suggestions (do the h3 grids etc) to get the final app. The end result is pretty decent. <a href="https://019de879-b41a-d1dd-1c9c-0d589df64c0e.share.connect.posit.cloud/">Hosted it here using Posit Connect</a>. The github repo is <a href="https://github.com/viswaduttp/pm25_data_shrug">here</a></p>
<p>The Posit AI is giving USD 5 of free usage in trial and I burned through it pretty fast on making this app and I would like to polish it further. Not sure, how much good the $20 per month would be for multiple projects.</p>



 ]]></description>
  <category>Tech</category>
  <category>Shiny</category>
  <category>AI</category>
  <category>Posit</category>
  <category>Rstats</category>
  <guid>https://viswaduttp.github.io/posts/built-shiny-app-posit-ai/</guid>
  <pubDate>Sat, 02 May 2026 00:00:00 GMT</pubDate>
  <media:content url="https://viswaduttp.github.io/posts/built-shiny-app-posit-ai/thumbnail.png" medium="image" type="image/png" height="71" width="144"/>
</item>
<item>
  <title>Loan vs FD</title>
  <dc:creator>Viswadutt Poduri</dc:creator>
  <link>https://viswaduttp.github.io/posts/Loan_vs_FD/</link>
  <description><![CDATA[ 





<p>Recently, I came across a video which says that if you have INR 10 lakh and want to buy a car, it is better to buy via loan than to pay the 10 lakh upfront. The proof was the screenshots of interest paid in the loan and interest received from FD. To put it in numbers, if you invest the 10lakh in a bank FD the interest amount you get at say 8% rate in say, 5 years is higher than the interest you need to pay on the loan say, at 9% rate. The ‘reason’ offered for this difference was - bank FD is compounded over 5 years vs the car loan which is on a reducing balance, so you will be better off taking a loan at a higher rate than the FD rate.</p>
<p>I have got these numbers from Groww for easy representation</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://viswaduttp.github.io/posts/Loan_vs_FD/fd.png" class="img-fluid figure-img"></p>
<figcaption>from Growww</figcaption>
</figure>
</div>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://viswaduttp.github.io/posts/Loan_vs_FD/car_loan.png" class="img-fluid figure-img"></p>
<figcaption>from Growww</figcaption>
</figure>
</div>
<p>The statement above made by the influencer is clearly wrong and see if you could identify the fallacy.</p>
<p>If the statement is true, then there is an arbitrage opportunity to make free money, take a 10lakh loan at 9% and invest in bank FD at 8% and make money at the end ?</p>
<p>The interest rate in the (car) loan is for the time value of money plus the risk premium, sure the interest component of EMI reduces as you pay down your loan every month. But, is it correct to say you would be better off taking the loan at a higher rate (than what you would get in a FD) and investing the 10lakh in FD ? for a moment forget about tax on FD. The FD’s future value of INR 14.85 lakh after 5 years means that it is equal to today’s 10lakh at 8% annual discount rate <sup>1</sup>. You can see that the FD amount is paid to the investor in full only after the term, not during the term. So, if we want to compare the loan, it is only fair that you compare the payments in the same terms.</p>
<section id="calculation" class="level2">
<h2 class="anchored" data-anchor-id="calculation">Calculation</h2>
<p>EMI for a 10 lakh loan at 9% annual interest rate for 5 years is 20.75k. Then there is a bank FD that pays 8% annual interest on the investment compounded monthly. Assume you can withdraw the EMI amount from the bank to meet the payment. If the bank FD is really beneficial at the end we will be left with money, but instead we will be short by 2EMIs.</p>
<p><a href="https://docs.google.com/spreadsheets/d/1-UjxOJfWO8AqpFmxnsesvJ6g-phv5xMcLffyQkxdSVw/" target="_blank"> Click here to open the Google Sheet </a></p>
<div class="spreadsheet-embed js-embed" data-src="https://docs.google.com/spreadsheets/d/e/2PACX-1vT9QjON3cO3RIOmzosj209DVAmEfummr4A1325JDQfuW3F3Dk_SnVTbE41zL0mNhOjmlXd20s8j-7Ho/pubhtml?gid=0&amp;single=true&amp;widget=true&amp;headers=false" data-title="Loan vs FD calculation sheet">

</div>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>I would think that the reason one should take a loan even though they have ready cash is related to optionality of cash and risk taking options. If you have 10 lakh cash in FD, you can sleep in peace knowing that you can get ready cash by breaking the FD in case of any emergency (reduced interest is only a small price to pay). Or you want to deploy the cash in an investment over a period of time.</p>
<p>PS: I surely have spent more effort in refuting the bullshit inline with the Bullshit Asymmetry Principle</p>


</section>


<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>The compounding done by Groww is quarterly so the annual return is ~8.2%4↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>Excel</category>
  <category>Loan</category>
  <category>FD</category>
  <category>EMI</category>
  <guid>https://viswaduttp.github.io/posts/Loan_vs_FD/</guid>
  <pubDate>Fri, 19 Sep 2025 00:00:00 GMT</pubDate>
  <media:content url="https://viswaduttp.github.io/posts/Loan_vs_FD/thumbnail.png" medium="image" type="image/png" height="96" width="144"/>
</item>
<item>
  <title>CSV to Parquet</title>
  <dc:creator>Viswadutt Poduri</dc:creator>
  <link>https://viswaduttp.github.io/posts/useR_2025/</link>
  <description><![CDATA[ 





<p>Update: My useR! 2025 talk was highlighted by the organizing team as one of the most watched talks. <a href="https://www.linkedin.com/posts/viswadutt_r-user-user2026-share-7447349795918131200-l8sF?utm_source=share&amp;utm_medium=member_desktop&amp;rcm=ACoAABKn7o8BAJav0_25gysF6-9IIA2ycdZEwF0">Delighted that the talk resonated with wider audiences</a></p>
<p>Sharing slides of my useR!2025 talk, <em>CSV to Parquet: Managing Data for Multi-language Analytics Teams</em></p>
<section id="slides" class="level2">
<h2 class="anchored" data-anchor-id="slides">Slides</h2>
<p><a href="https://docs.google.com/presentation/d/e/2PACX-1vQpGIN2Ol9lk7GC3lIUku96-KWPFs8qzF9pd7Qf45a0y5m2SVjLKLWo8vgfxi99BvSm2_jx7wm8RqB2/pub?start=false&amp;loop=false&amp;delayms=3000">Open the slides</a></p>
<div class="responsive-embed js-embed" data-src="https://docs.google.com/presentation/d/e/2PACX-1vQpGIN2Ol9lk7GC3lIUku96-KWPFs8qzF9pd7Qf45a0y5m2SVjLKLWo8vgfxi99BvSm2_jx7wm8RqB2/pubembed?start=false&amp;loop=false&amp;delayms=3000" data-title="CSV to Parquet slides">

</div>
</section>
<section id="talk" class="level2">
<h2 class="anchored" data-anchor-id="talk">Talk</h2>
<p><a href="https://www.youtube.com/watch?v=TnFQOE3_H5A">Watch the talk on YouTube</a></p>
<div class="responsive-embed js-embed" data-src="https://www.youtube.com/embed/TnFQOE3_H5A" data-title="CSV to Parquet talk">

</div>


</section>

 ]]></description>
  <category>Rstats</category>
  <category>talk</category>
  <category>useR</category>
  <guid>https://viswaduttp.github.io/posts/useR_2025/</guid>
  <pubDate>Sat, 05 Jul 2025 00:00:00 GMT</pubDate>
  <media:content url="https://viswaduttp.github.io/posts/useR_2025/slide.jpeg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Standard Error in Binomial Distribution</title>
  <dc:creator>Viswadutt Poduri</dc:creator>
  <link>https://viswaduttp.github.io/posts/Binomial_Standard_Error/</link>
  <description><![CDATA[ 





<p>A coin is tossed 1000 times and it landed heads 400 times. How confident we are whether the coin is fair ?</p>
<p>We can do a test of proportions, and our test statistic is (<img src="https://latex.codecogs.com/png.latex?%5Cbar%7Bp%7D">-<img src="https://latex.codecogs.com/png.latex?%7BP%7D">)/<img src="https://latex.codecogs.com/png.latex?%5Csqrt%7BPQ/n%7D"></p>
<p>The sample size (n) is 1000 and we have observed heads 400 times meaning <img src="https://latex.codecogs.com/png.latex?%5Cbar%7Bp%7D"> = 0.4 and <img src="https://latex.codecogs.com/png.latex?%5Cbar%7Bq%7D"> = 0.6.</p>
<p>The sample mean <img src="https://latex.codecogs.com/png.latex?%5Cbar%7Bx%7D"> is 400 (1000 x 0.4) (X is binomial)</p>
<p>here P = Q = 0.5 (population estimate)</p>
<p>Now the denominator <img src="https://latex.codecogs.com/png.latex?%5Csqrt%7BPQ/n%7D"> is the standard error of the sample proportion <img src="https://latex.codecogs.com/png.latex?%5Cbar%7Bp%7D"></p>
<p>This variance scaling is not really intuitive at the first look.</p>
<p>The variance is scaled by square of n, so the variance of sample proportion is <img src="https://latex.codecogs.com/png.latex?%7BnPQ/n%5E2%7D"> which is PQ/n and hence the standard error (same as standard deviation) is <img src="https://latex.codecogs.com/png.latex?%5Csqrt%7BPQ/n%7D"></p>
<p>We could have solved the problem by testing number of heads instead of proportion of heads (400-500/15.81). 15.81 is just simply <img src="https://latex.codecogs.com/png.latex?%5Csqrt%7B0.5*.0.5*1000%7D"></p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://viswaduttp.github.io/posts/Binomial_Standard_Error/gemini_gen_image.png" class="img-fluid figure-img"></p>
<figcaption>Generated using Gemini</figcaption>
</figure>
</div>



 ]]></description>
  <category>Probability</category>
  <guid>https://viswaduttp.github.io/posts/Binomial_Standard_Error/</guid>
  <pubDate>Sun, 19 Jan 2025 00:00:00 GMT</pubDate>
  <media:content url="https://viswaduttp.github.io/posts/Binomial_Standard_Error/gemini_gen_image.png" medium="image" type="image/png" height="79" width="144"/>
</item>
<item>
  <title>Monty Hall Problem</title>
  <dc:creator>Viswadutt Poduri</dc:creator>
  <link>https://viswaduttp.github.io/posts/Monty_Hall/</link>
  <description><![CDATA[ 





<p>There are 3 doors (A,B,C) and only 1 door has a car behind it and the other two doors have goats behind them. Say, you have selected door A - now, the game show host opens B and shows it to be a goat. Now, you have an option to switch the door from A to C. should you switch ?</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://viswaduttp.github.io/posts/Monty_Hall/genai_monty.png" class="img-fluid figure-img"></p>
<figcaption>Generated using Dall-E</figcaption>
</figure>
</div>
<p>This seemingly simple problem statement has tortured novices and pros alike. To answer this question, we need to know how the odds change for winning if we switch vs if we don’t. When we don’t switch the probability of winning would remain at 1/3. When we switch there is 1/3 chance of selecting a car and losing and 2/3 chance of choosing a goat and winning (due to switch), so switching nearly doubles our chances.<a href="https://youtu.be/CYyUuIXzGgI?t=155">Thank you for the extra 33.3%</a>. <sup>1</sup></p>
<p>I have simulated this scenario below in R</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(dplyr)</span></code></pre></div></div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">set.seed</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>)</span>
<span id="cb2-2"></span>
<span id="cb2-3">  doors <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'A'</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'B'</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'C'</span>)</span>
<span id="cb2-4">  car_door <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">sample</span>(doors, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">size =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">10000</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">replace =</span> T)</span>
<span id="cb2-5">  choosen_door <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">sample</span>(doors, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">size =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">10000</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">replace =</span> T)</span></code></pre></div></div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">set.seed</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>)</span>
<span id="cb3-2"></span>
<span id="cb3-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tibble</span>(</span>
<span id="cb3-4">       <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">car =</span> car_door,</span>
<span id="cb3-5">       <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">choosen =</span> choosen_door) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-6">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rowwise</span>() <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-7">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">door_revealed =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">sample</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">setdiff</span>(doors, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(car, choosen)), <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>)</span>
<span id="cb3-8">         ) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-9">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">switch =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">setdiff</span>(doors, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(choosen, door_revealed))) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-10">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ungroup</span>()<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-11">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">remain =</span> choosen) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span> </span>
<span id="cb3-12">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">switch_win =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ifelse</span>(car <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">switch</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>),</span>
<span id="cb3-13">         <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">remain_win =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ifelse</span>(car <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> remain, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>)</span>
<span id="cb3-14">         ) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-15">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">summarize</span>(</span>
<span id="cb3-16">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">switch_win_rate =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">sum</span>(switch_win)<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">n</span>(),</span>
<span id="cb3-17">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">remain_win_rate =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">sum</span>(remain_win)<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">n</span>()</span>
<span id="cb3-18">  )</span></code></pre></div></div>
<div class="cell-output cell-output-stdout">
<pre><code># A tibble: 1 × 2
  switch_win_rate remain_win_rate
            &lt;dbl&gt;           &lt;dbl&gt;
1           0.665           0.335</code></pre>
</div>
</div>




<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>For a more detailed discussion visit <a href="https://brilliant.org/wiki/monty-hall-problem/">Brilliant</a>.↩︎</p></li>
</ol>
</section></div> ]]></description>
  <category>Rstats</category>
  <category>Simulation</category>
  <guid>https://viswaduttp.github.io/posts/Monty_Hall/</guid>
  <pubDate>Wed, 08 Jan 2025 00:00:00 GMT</pubDate>
  <media:content url="https://viswaduttp.github.io/posts/Monty_Hall/genai_monty.png" medium="image" type="image/png" height="96" width="144"/>
</item>
<item>
  <title>About this page</title>
  <dc:creator>Viswadutt Poduri</dc:creator>
  <link>https://viswaduttp.github.io/posts/About/</link>
  <description><![CDATA[ 





<p>This page is made using Quarto. Heavily borrowed from the guide made by Albert Rapp. Some other useful links to make your own quarto website on github pages are given below.</p>
<ol type="1">
<li><a href="https://albert-rapp.de/posts/13_quarto_blog_writing_guide/13_quarto_blog_writing_guide.html">Albert Rapp</a></li>
<li><a href="https://quarto.org/docs/publishing/github-pages.html">Quarto on Github Pages</a></li>
<li><a href="https://robertmitchellv.com/blog/2022-08-building-with-quarto/building-with-quarto.html">Building with Quarto - Robert Mitchell</a></li>
<li><a href="https://quarto.org/docs/gallery/#websites">Quarto Gallery</a></li>
</ol>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://viswaduttp.github.io/posts/About/quarto_dallE.jpeg" class="img-fluid figure-img"></p>
<figcaption>Generated using Dall-E</figcaption>
</figure>
</div>



 ]]></description>
  <category>Tech</category>
  <guid>https://viswaduttp.github.io/posts/About/</guid>
  <pubDate>Fri, 10 Mar 2023 00:00:00 GMT</pubDate>
  <media:content url="https://viswaduttp.github.io/posts/About/quarto_dallE.jpeg" medium="image" type="image/jpeg"/>
</item>
</channel>
</rss>
