Spaces:
Running
Running
Update config.py
Browse files
config.py
CHANGED
|
@@ -25,8 +25,10 @@ You are a supportive and knowledgeable tutor, embedded in a Shiny application th
|
|
| 25 |
- Refer specifically to the slider and numeric inputs in the sidebar (“Population SD,” “Sample Size (each),” “Number of Random Samples,” “Confidence Level (%)”) to guide hands-on experimentation.
|
| 26 |
|
| 27 |
3. **Address the Guiding Questions**
|
| 28 |
-
- **Question 1:** “If you run 100 simulated experiments, how many experiments (red dots) failed to contain the true population mean within their 95% CI?”
|
| 29 |
- **Question 2:** “Why is it sometimes not exactly 5 red dots (i.e., sample means with 95% CIs that don’t include the population mean) even though 95% of the intervals are supposed to capture the true mean?”
|
|
|
|
|
|
|
| 30 |
- **YOU ARE NOT ALLOWED TO DIRECTLY ANSWER THE GUIDING QUESTIONS.** Instead suggest how the student can use the app simulation to infer the answer.
|
| 31 |
|
| 32 |
4. **Encourage Critical Thinking**
|
|
@@ -85,7 +87,9 @@ For your own context and knowledge, use the UI and server code for this tab to i
|
|
| 85 |
hr(),
|
| 86 |
h4(strong("Guiding Questions:")),
|
| 87 |
h5("1. If you run 100 simulated experiments, how many experiments (red dots) failed to contain the true population mean within their 95% CI?"),
|
| 88 |
-
h5("2. Why is it sometimes not exactly 5 red dots (samples means with 95% CIs that don't include the population mean?)")
|
|
|
|
|
|
|
| 89 |
),
|
| 90 |
mainPanel(
|
| 91 |
plotOutput("plot_tab2"),
|
|
@@ -174,7 +178,7 @@ For your own context and knowledge, use the UI and server code for this tab to i
|
|
| 174 |
###########################################################################################
|
| 175 |
# Model Configuration
|
| 176 |
###########################################################################################
|
| 177 |
-
ai_model = "gpt-
|
| 178 |
temperature = 0.05 # 0 to 1: Higher values = more creative responses
|
| 179 |
max_tokens = 500 # 1 to 2048: Max tokens in the response
|
| 180 |
frequency_penalty = 0.5 # 0 to 1: Higher values = more penalty for repeating phrases
|
|
@@ -188,13 +192,13 @@ instructions = '''This is a basic chatbot template. Place user instructions here
|
|
| 188 |
|
| 189 |
opening_message = '''👋 **Welcome to the Confidence Intervals Chatbot!**
|
| 190 |
|
| 191 |
-
|
| 192 |
-
-
|
| 193 |
-
-
|
| 194 |
-
-
|
| 195 |
-
|
| 196 |
-
I encourage you to think critically as you generate multiple samples, observe how many confidence intervals fail to include the true mean, and compare results across different settings. Let’s work together to deepen your understanding of the underlying statistics, one group of samples at a time.
|
| 197 |
|
| 198 |
-
|
|
|
|
| 199 |
|
| 200 |
warning_message = "**Generative AI can make errors and does not replace verified and reputable online and classroom resources.**"
|
|
|
|
| 25 |
- Refer specifically to the slider and numeric inputs in the sidebar (“Population SD,” “Sample Size (each),” “Number of Random Samples,” “Confidence Level (%)”) to guide hands-on experimentation.
|
| 26 |
|
| 27 |
3. **Address the Guiding Questions**
|
| 28 |
+
- **Question 1:** “If you run 100 simulated experiments, how many experiments (red dots) failed to contain the true population mean within their 95% CI? What about 10 or 1,000?”
|
| 29 |
- **Question 2:** “Why is it sometimes not exactly 5 red dots (i.e., sample means with 95% CIs that don’t include the population mean) even though 95% of the intervals are supposed to capture the true mean?”
|
| 30 |
+
- **Question 3:** "How does changing standard deviation and sample size affect the output?"
|
| 31 |
+
- **Question 4:** "What is the relationship between a confidence interval and standard error?"
|
| 32 |
- **YOU ARE NOT ALLOWED TO DIRECTLY ANSWER THE GUIDING QUESTIONS.** Instead suggest how the student can use the app simulation to infer the answer.
|
| 33 |
|
| 34 |
4. **Encourage Critical Thinking**
|
|
|
|
| 87 |
hr(),
|
| 88 |
h4(strong("Guiding Questions:")),
|
| 89 |
h5("1. If you run 100 simulated experiments, how many experiments (red dots) failed to contain the true population mean within their 95% CI?"),
|
| 90 |
+
h5("2. Why is it sometimes not exactly 5 red dots (samples means with 95% CIs that don't include the population mean?)"),
|
| 91 |
+
h5("3. How does changing standard deviation and sample size affect the output?"),
|
| 92 |
+
h5("4. What is the relationship between a confidence interval and standard error?")
|
| 93 |
),
|
| 94 |
mainPanel(
|
| 95 |
plotOutput("plot_tab2"),
|
|
|
|
| 178 |
###########################################################################################
|
| 179 |
# Model Configuration
|
| 180 |
###########################################################################################
|
| 181 |
+
ai_model = "gpt-4.1" # Choose from: gpt-4o,gpt-4.1, gpt-4o-mini, etc.
|
| 182 |
temperature = 0.05 # 0 to 1: Higher values = more creative responses
|
| 183 |
max_tokens = 500 # 1 to 2048: Max tokens in the response
|
| 184 |
frequency_penalty = 0.5 # 0 to 1: Higher values = more penalty for repeating phrases
|
|
|
|
| 192 |
|
| 193 |
opening_message = '''👋 **Welcome to the Confidence Intervals Chatbot!**
|
| 194 |
|
| 195 |
+
I'm here to facillitate as you attempt to use this simulation to answer the following:
|
| 196 |
+
- **Question 1:** “If you run 100 simulated experiments, how many experiments (red dots) failed to contain the true population mean within their 95% CI? What about 10 or 1,000?”
|
| 197 |
+
- **Question 2:** “Why is it sometimes not exactly 5 red dots (i.e., sample means with 95% CIs that don’t include the population mean) even though 95% of the intervals are supposed to capture the true mean?”
|
| 198 |
+
- **Question 3:** "How does changing standard deviation and sample size affect the output?"
|
| 199 |
+
- **Question 4:** "What is the relationship between a confidence interval and standard error?"
|
|
|
|
| 200 |
|
| 201 |
+
See what patterns you find when you adjust the simulation's parameters and repeatedly generate sample means.
|
| 202 |
+
'''
|
| 203 |
|
| 204 |
warning_message = "**Generative AI can make errors and does not replace verified and reputable online and classroom resources.**"
|