<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ryamada</author_name>
  <author_url>https://blog.hatena.ne.jp/ryamada/</author_url>
  <blog_title>ryamadaのコンピュータ・数学メモ</blog_title>
  <blog_url>https://ryamada.hatenadiary.jp/</blog_url>
  <categories>
    <anon>R</anon>
  </categories>
  <description>ここで尤度比を扱っている 尤度比は、尤度１と尤度２の比（割り算）である 尤度の計算は、「場合分け」をして、それを足し合わせたりするので、式が整理統合されずに長くなっていく… たとえば尤度である。 これをRに処理してもらおう library(rSymPy) p&lt;-Var(&quot;p&quot;) q&lt;-Var(&quot;q&quot;) L&lt;-1/8*2*p*q+1/4*p*p+1/4*2*q*p print(L) 結果 &gt; L [1] &quot;0.75*p*q + 0.25*p**2&quot; これの背景はPython library for symbolic mathematics（こちら） 式の因数分解とかもしてほしいのだけれど、それは…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fryamada.hatenadiary.jp%2Fentry%2F20110516%2F1305511840&quot; title=&quot;数式の扱い sympyをRで - ryamadaのコンピュータ・数学メモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-05-16 11:10:40</published>
  <title>数式の扱い sympyをRで</title>
  <type>rich</type>
  <url>https://ryamada.hatenadiary.jp/entry/20110516/1305511840</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
