Skip to content

Commit af6bc3d

Browse files
Better image alt text (#221)
1 parent 9a7d0e0 commit af6bc3d

7 files changed

Lines changed: 18 additions & 16 deletions

File tree

chapters/01/3/1/Literary_Characters.ipynb

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

chapters/05/1/Arrays.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"cell_type": "markdown",
116116
"metadata": {},
117117
"source": [
118-
"![array arithmetic](../../../images/array_arithmetic.png)"
118+
"![Visual representation of array arithmetic. (9/5) times the array highs (13.6, 14.387, 14.585, 15.164) plus 32 equals (9/5) times 13.6 + 32 in the first slot of the resulting array, followed by (9/5) times 14.387 plus 32 in the second slot of the array, and so on. Finally on the right hand side of the image, an array is shown with the final answers (56.48, 57.8966, 58.253, 59.2952).](../../../images/array_arithmetic.png)"
119119
]
120120
},
121121
{

chapters/08/Functions_and_Tables.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"source": [
6565
"We start any function definition by writing `def`. Here is a breakdown of the other parts (the *syntax*) of this small function:\n",
6666
"\n",
67-
"![function syntax](../../images/function_definition.jpg)"
67+
"![The first line of the function is \"def double(x)\". \"double(x)\" is annotated as the signature. \"double\" is the name of the function and \"x\" is the first (and only) argument. The next line is indented and shows three double quotes surrounding \"Double x\". This is annotated as the documentation or docstring that describes what the function does. The following line is \"return 2*x\" and annotated as the body. The body is all the code that runs each time you call the function. Return tells Python what the value of each call to the function is: it's the value of the expression after return. Finally, the indendation of the docstring and the body is highlighted. This indentation tells Python that those lines are part of the body.](../../images/function_definition.jpg)"
6868
]
6969
},
7070
{
@@ -441,7 +441,7 @@
441441
"metadata": {
442442
"anaconda-cloud": {},
443443
"kernelspec": {
444-
"display_name": "venv-new-jb",
444+
"display_name": "venv-new-jb (3.9.6)",
445445
"language": "python",
446446
"name": "python3"
447447
},

chapters/12/2/Causality.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@
290290
"\n",
291291
"Here is a good way to visualize the setting. Each patient has a two-sided ticket:\n",
292292
"\n",
293-
"![Two-sided ticket](../../../images/causality1.png)"
293+
"![Image of a slide titled \"Before the Randomization.\" Bullet point one reads \"In the population there is one imaginary ticket for each of the 31 participants in the experiment.\" Bullet point two reads \"Each participant's ticket looks like this:\" followed by a graphic. One potential outcome, pictured on the left, is \"Outcome if assigned to treatment group\" and another potential outcome, pictured on the right, is \"Outcome if assigned tcontrol group\"](../../../images/causality1.png)"
294294
]
295295
},
296296
{
@@ -299,7 +299,7 @@
299299
"source": [
300300
"After the randomization, we get to see the right half of a randomly selected set of tickets, and the left half of the remaining group.\n",
301301
"\n",
302-
"![Half-tickets](../../../images/causality2.png)\n",
302+
"![A slide titled \"Teh Data.\" 16 randomly picked tickets show: the right hand side of the previous graphic with \"Outcome if assigned to control group.\" The remaining 15 tickets show: the left hand side of the previous graphic with \"Outcome if assigned to treatment group\"](../../../images/causality2.png)\n",
303303
"\n",
304304
"The table `observed_outcomes` collects the information about every patient's potential outcomes, leaving the unobserved half of each \"ticket\" blank. (It's just another way of thinking about the `bta` table, carrying the same information.)"
305305
]

chapters/13/2/Bootstrap.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,9 @@
462462
"source": [
463463
"## Why the Bootstrap Works\n",
464464
"\n",
465-
"Why is this a good idea? By the law of averages, the distribution of the original sample is likely to resemble the population, and the distributions of all the \"resamples\" are likely to resemble the original sample. So the distributions of all the resamples are likely to resemble the population as well. "
465+
"Why is this a good idea? By the law of averages, the distribution of the original sample is likely to resemble the population, and the distributions of all the \"resamples\" are likely to resemble the original sample. So the distributions of all the resamples are likely to resemble the population as well. \n",
466+
"\n",
467+
"![An illustration of the bootstrap annotated \"All of these look pretty similar, most likely. On the left is a graph showing the population with an arrow pointing to a sample. The sample looks similar to the population, but isn't exactly the same. From the sample, multiple resamples are shown which all have different distributions but are also similar to the sample and the population.](../../../images/bootstrap_pic.png)"
466468
]
467469
},
468470
{

chapters/15/2/Regression_Line.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@
561561
"$$\n",
562562
"\n",
563563
"\n",
564-
"![regline](../../../images/regline.png)\n",
564+
"![Two figures are shown. The first is labeled \"Regression Line in Standard Units.\" We see the point (0,0) with a horizontal line extending to the right. The length of the horizontal line is 1. From the end of that horizontal line is a veritcal line that extends upward with length r. The regression line is a sloping line that connects (and extends beyond in both directions) from (0,0) to the top of the vertical line. The second figure is labeled \"Regression Line in Original Units.\" A similar figure is shown with different annotations. (0,0) is now (average of x, average of y), the horizontal length is now \"SD of x\" and the vertical length is now \"r SD of y\"](../../../images/regline.png)\n",
565565
"\n",
566566
"The slope and intercept of the regression line in original units can be derived from the diagram above. \n",
567567
"\n",

chapters/18/2/Making_Decisions.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"## A Test for a Rare Disease\n",
7878
"Suppose there is a large population and a disease that strikes a tiny proportion of the population. The tree diagram below summarizes information about such a disease and about a medical test for it.\n",
7979
"\n",
80-
"![Tree Rare Disease](../../../images/tree_disease_rare.png)"
80+
"![The first branching of the tree goes 0.004 to \"Disease\" and 0.996 to \"No Disease.\" From \"Disease\" there is another branching with 0.99 going to \"Test Positive\" and 0.01 going to \"Test Negative.\" From \"No Disease\" there is also another branching with 0.005 going to \"Test Positive\" and 0.995 going to \"Test Negative.\"](../../../images/tree_disease_rare.png)"
8181
]
8282
},
8383
{
@@ -209,7 +209,7 @@
209209
"source": [
210210
"The reason is that a huge fraction of the population doesn't have the disease in the first place. The tiny fraction of those that falsely test Positive are still greater in number than the people who correctly test Positive. This is easier to visualize in the tree diagram:\n",
211211
"\n",
212-
"![Tree Rare Disease](../../../images/tree_disease_rare.png)\n",
212+
"![The first branching of the tree goes 0.004 to \"Disease\" and 0.996 to \"No Disease.\" From \"Disease\" there is another branching with 0.99 going to \"Test Positive\" and 0.01 going to \"Test Negative.\" From \"No Disease\" there is also another branching with 0.005 going to \"Test Positive\" and 0.995 going to \"Test Negative.\"](../../../images/tree_disease_rare.png)\n",
213213
"\n",
214214
"- The proportion of true Positives is a large fraction (0.99) of a tiny fraction (0.004) of the population.\n",
215215
"- The proportion of false Positives is a tiny fraction (0.005) of a large fraction (0.996) of the population.\n",
@@ -243,7 +243,7 @@
243243
"source": [
244244
"Suppose the doctor's subjective opinion is that there is a 5% chance that the patient has the disease. Then just the prior probabilities in the tree diagram will change:\n",
245245
"\n",
246-
"![Tree: Subjective Prior](../../../images/tree_disease_subj.png)"
246+
"![The first branching of the tree goes 0.05 to \"Disease\" and 0.95 to \"No Disease.\" From \"Disease\" there is another branching with 0.99 going to \"Test Positive\" and 0.01 going to \"Test Negative.\" From \"No Disease\" there is also another branching with 0.005 going to \"Test Positive\" and 0.995 going to \"Test Negative.\"](../../../images/tree_disease_subj.png)"
247247
]
248248
},
249249
{

0 commit comments

Comments
 (0)