Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
  • Loading branch information
hcyhh committed Nov 1, 2024
1 parent f08e7e5 commit 47f9605
Show file tree
Hide file tree
Showing 25 changed files with 142 additions and 176 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .Rproj.user/99DB3CFB/pcs/source-pane.pper
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"activeTab": -1
"activeTab": 0
}
14 changes: 7 additions & 7 deletions .Rproj.user/99DB3CFB/pcs/windowlayoutstate.pper
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"left": {
"splitterpos": 625,
"topwindowstate": "HIDE",
"panelheight": 1503,
"windowheight": 1541
"splitterpos": 407,
"topwindowstate": "MAXIMIZE",
"panelheight": 980,
"windowheight": 1018
},
"right": {
"splitterpos": 574,
"splitterpos": 807,
"topwindowstate": "NORMAL",
"panelheight": 1409,
"windowheight": 1446
"panelheight": 980,
"windowheight": 1018
}
}
1 change: 1 addition & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ book:
title: "博士期间作业"
author: "CongyuanHe"
date: now

chapters:
- index.qmd
- part: Bayesian.qmd
Expand Down
55 changes: 1 addition & 54 deletions bayesian hw 2.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ q&=\int_{0}^{c} f(\theta)d\theta \\
q&= c^{10}
\end{align}
```
5 分位数为 $0.05^{0.1}$
5 分位数为 $0.05^{10}$

# EXERCISE 5.4.

Expand Down Expand Up @@ -824,18 +824,14 @@ b <- (1.645/(u-a))^2
b
```
::: callout-note
$\mu ~ N(60, 1/0.02706025)$
$\sigma ~ Gamma(60.92188, 3.068)$
:::
- you are 95% sure that the mean exam score is less than 65,
```{r}
a=60
u=65
Expand Down Expand Up @@ -866,13 +862,11 @@ e
```
::: callout-note
$\mu ~ N(60, 1/0.108241)$
$\sigma ~ Gamma(60.92188, 3.068)$
:::
- your best guess for the 90th percentile of exam scores is 80, and
```{r}
Expand Down Expand Up @@ -905,18 +899,13 @@ e
```
::: callout-note
$\mu ~ N(60, 1/0.108241)$
$\sigma ~ Gamma(15.5625, 0.932)$
:::
- you are 95% sure that the 90th percentile is less than 90
```{r}
a=60
u=65
Expand Down Expand Up @@ -947,7 +936,6 @@ e
```
::: callout-note
$\mu ~ N(60, 1/0.108241)$
$\sigma ~ Gamma(18.01562, 1.089)$
Expand All @@ -963,7 +951,6 @@ b中对应部分修改为70
# EXERCISE 5.29.
```{r}
Expand Down Expand Up @@ -1032,7 +1019,6 @@ summary(results)
```
# EXERCISE 5.30.
```{r}
Expand Down Expand Up @@ -1094,7 +1080,6 @@ summary(results)
plot(results)
```
```{r}
# 选择不同的先验分布
sensitivity_analysis <- function(mu1_prior, mu2_prior, tau1_prior, tau2_prior) {
Expand Down Expand Up @@ -1142,41 +1127,3 @@ sensitivity_results <- sensitivity_analysis("dunif(-10000, 10000)", "dunif(-1000
plot(sensitivity_results)
```
31 changes: 20 additions & 11 deletions docs/bayesian hw 1.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

<meta name="author" content="Congyuan He">
<meta name="dcterms.date" content="2024-10-21">
<meta name="dcterms.date" content="2024-11-01">

<title>博士期间作业 - bayesian hw 1</title>
<style>
Expand Down Expand Up @@ -137,7 +137,7 @@

</head>

<body class="nav-sidebar floating">
<body class="nav-sidebar docked">

<div id="quarto-search-results"></div>
<header id="quarto-header" class="headroom fixed-top">
Expand All @@ -158,8 +158,11 @@
<!-- content -->
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation floating overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header sidebar-header-stacked">
<a href="./index.html" class="sidebar-logo-link">
<img src="./images/san.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">博士期间作业</a>
</div>
Expand Down Expand Up @@ -204,28 +207,34 @@
<div class="sidebar-item-container">
<a href="./Survival.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Survival</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./survival hw 1.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">survival hw 1</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./survival hw 2.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">survival hw 2</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a href="./Causal inference.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Causal inference</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section">
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="false" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show">
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./causal inference hw 1.html" class="sidebar-item-text sidebar-link">
Expand All @@ -238,11 +247,11 @@
<div class="sidebar-item-container">
<a href="./Linear regression.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Linear regression</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-4" aria-expanded="true" aria-label="Toggle section">
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-4" aria-expanded="false" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-4" class="collapse list-unstyled sidebar-section depth1 show">
<ul id="quarto-sidebar-section-4" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./linear regression hw 3.html" class="sidebar-item-text sidebar-link">
Expand Down Expand Up @@ -294,7 +303,7 @@ <h1 class="title">bayesian hw 1</h1>
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">October 21, 2024</p>
<p class="date">November 1, 2024</p>
</div>
</div>

Expand Down
Loading

0 comments on commit 47f9605

Please sign in to comment.