Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Inferencia estadistica

Independent Spanish statistics classroom, published at https://webs.raular.com/inferencia/ from the main branch.

Content and activities

  • 36 lessons: an optional mathematics bridge and the four supplied topics.
  • Prerendered theory, heading links, a table of contents and local full-text search.
  • 17 visual laboratories, 36 seeded exercise generators and 36 animated classes.
  • Concept checks, hints, worked solutions, subtitles and optional transcripts.
  • Each lesson opens with a line naming the topic and section of the supplied notes, linked to the matching PDF page (src/lib/pdf-pages.js; bridge lessons say they are prior review). Below it are three tabs: Lesson, Exercises and Animated Recap ("Repaso animado").
  • The Lesson tab shows, in order: the narrated section journey, a visible summary (goals, key formulas, method, pitfalls), the complete written notes collapsed in reading order, fixed lesson-specific practice and the concept check. Previous/next section buttons come after all this content. Symbols are available under Materials, in the Notes section. The selected activity is linkable with ?actividad=...; only the selected activity is mounted, with no duplicate internal navigation.
  • Animated-reading transport moves to the previous or next complete sentence, crossing scene boundaries as needed. Playback controls are play/pause, previous/next phrase, time seeking and fullscreen.
  • All lessons and exercise solutions share one Konva whiteboard: diagrams, text and vector formulas stay inside the video, with no internal scrolling or separate formula panel. Accumulated operations appear in cue-aligned blocks; seeking backward restores the matching block. Controls overlay the video, start hidden and hide again three seconds after being shown. Touching the video or using Enter/Space shows them again. A central play button starts paused videos. Optional subtitles appear inside the video in one or two lines; the captions button shows or hides them. The board reserves their area so operations are not covered by subtitles or visible controls. Long cues are displayed as consecutive complete fragments without changing their recorded audio or transcript. Normal video keeps 16:9; expanded landscape mode fills the entire viewport, reflowing the whiteboard instead of letterboxing it. The transcript remains outside the video.
  • The short /inferencia/ URL opens a course overview with direct access to the curriculum, materials and each topic; /temario/ holds the reference map, with topics 0 to 5 and numbered lessons. All topics start collapsed; none is forced open by the generator. Topic 5 solves all three PEC 1 problems, including 13 numerical questions, three qualitative arguments, full sample spaces and additional diagrams.
  • There is no study tracking or saved exercise history. Concept checks and answers receive immediate feedback without reading or writing browser storage. Previous progress data is left untouched and is no longer used. The former /progreso/ route redirects home; the brand in the navbar links home.

The original explanations, formulas, source references and exercise engines live under pages/inferencia/. scripts/generate-docs.mjs produces the MDX lessons from that single content source; do not edit the ignored docs/ output. Update pages/inferencia/course.js to edit the curriculum. Written note bodies (section and example body) may contain inline TeX between dollar signs, for example $f_X(x)=2(1-x)$; the generator turns it into KaTeX. Keep spoken fields (method, pitfalls, formulas[].reading) as plain words, and do not change lesson.source without regenerating audio, because it belongs to the frozen narration signature. Section titles are referenced by lesson-sections.js. The conversational lecture walkthroughs live in pages/inferencia/lecture-story.js; they explain the same concepts with spoken examples rather than reading the web text aloud. Worked practice in both formats uses the shared exercise generators.

Reading Without A Mathematics Background

The three tabs are Lesson, Exercises and Animated Recap. Lesson uses 118 separate sections across the 36 lessons, with conversational narration, cue-aligned whiteboard reveals and scoped worked examples. Symbols and conditions are introduced before their calculations. Complete notes remain available in an optional disclosure, including the source concepts and additional worked derivations. The spoken introduction does not recite every formal derivation. Only additional curriculum material is labelled as an optional section. Animated Recap retains the complete global walkthrough of the lesson; it has no published audio and runs on the estimated clock. Laboratories appear only as the six reading figures and inside the legacy fixture, not as a tab.

All 118 sections and 36 global recaps start with a contextual figure. The shared renderer binds geometry and highlights to the current spoken cue, including inverse sampling, event regions, trial sequences, nonlinear dependence and bivariate normal contours. Future calculations remain hidden until introduced.

Section scripts live in pages/inferencia/lesson-sections.js; the shared vocabulary in pages/inferencia/teaching.js explains symbols locally and in the searchable glossary. Section audio has its own stable IDs and measured phrase timings, and can be generated and published incrementally without changing the global recap or an earlier frozen TTS batch.

The active scripts for all 118 sections and 36 recaps have been rewritten against the PDFs in static/materiales/. They introduce the question, explain why each operation applies and interpret its result. The shared exercise-narration.js supplies the same reasoning to exercise videos and worked recap examples, including PDF, PEC and seeded practice questions. Formula and figure reveals follow the revised phrases; numeric answers and source errata remain checked. The editorial storyboard remains a production reference, not the runtime transcript source.

All 118 published MP3s and six historical archived recordings were removed on 2026-11-10 for complete regeneration. The audio manifests and provenance were emptied, and obsolete preparation reports were removed. New complete Puck items are published incrementally. The existing prerecorded MP4 is retained but falls back to the current animation without a compatible recording. New audio and video require separate production with newly measured timings. Local TTS batches outside this repository were not deleted or changed.

New production uses the selected Gemini Puck voice and the general Remotion renderer for all 541 section, recap and exercise explanations. Narration is frozen, generated and measured per phrase; only complete, compatible recordings and videos can be published. All six keys belong to distinct Free Tier projects and are used with independent quota/pacing records. The production batch has 64 generated phrases and three complete audio/video items; the remaining 538 are paused until the projects' quota windows reopen around 2026-11-11 08:00 UTC. No Gemini generator is running or scheduled. A local six-phrase Remotion preview is explicitly partial and is not published. See the production and resumption guide.

Two independent local jobs now process those 538 pending explanations in parallel using the exact current transcripts. Remotion exports silent drafts with explicitly estimated timings and per-cue plans for later rerendering with measured audio. Ming synthesizes complete temporary Spanish recordings with measured cue timings; seven completed recordings were initially published, preserving all three Puck recordings. Draft videos are kept outside the public final-video manifest and never represented as synchronized narration. Both jobs checkpoint their progress outside Git and continue after terminal closure; the initial pilots suggest several days of processing, with WSL kept running.

Six lessons include a compact figure within the reading: Bayes, discrete CDFs, density, marginals, continuous conditioning and the bivariate normal. Each starts with a concrete question and ends with an interpretation. Figures reuse the laboratory calculations and canvas renderer without mounting the classroom, duplicating the laboratory controls.

Fixed practice selects only questions appropriate to the lesson and starts with different data from the section example, skipping duplicate seeded variants. Seven additional generators cover proportions, normalization, function values, plane regions, event independence, discrete cumulative tables and basic joint tables. The bridge laboratories offer matching elementary controls instead of starting every lesson with integration. Gamma consistently uses k for shape and alpha for scale, with rate = 1/scale.

The Exercises tab contains only original PDF problems: 22 numbered problems covering 87 numerical questions. All statements and their source links are listed directly, without exercise selectors or new-example buttons. Additional practice belongs to Lesson and stays within that lesson's learning scope. Every question starts with hints, animated solutions and written solutions closed. Written steps can be opened individually, revealed together or copied as explained text with TeX formulas. Qualitative PEC1 parts do not request a numerical answer.

Animated solutions use the same fixed responsive 16:9 player as lessons, with actual problem diagrams, cue-aligned operations and the current spoken phrase underneath. Spanish narration uses the browser's Web Speech engine unless a compatible MP3 is listed in static/audio/exercises-manifest.json. The current exercise manifest contains no generated MP3s; voice availability and quality depend on the browser and installed Spanish voices. Unavailable speech is reported explicitly. Pause, phrase seeking, visibility changes and disposal control the speech clock. Lesson MP3s are pending regeneration. Numerical answers are independently checked, including corrections to errors in the PDF solutions. The assessment statement has its own three-page topic 5, separate from the 22-problem bank. Both sources retain their original problem and part numbering. Consulting either set of PDF solutions never records an attempt. Normal, density, discrete-moment, event and Bayes calculations have dedicated small operations. Other generators reuse their existing mathematical steps. Watching a calculation does not record help, answers or study marks. Normal practice varies interval bounds and percentile targets; seed 1 remains unchanged for existing lecture scripts and frozen TTS batches.

React embeds the existing classroom engine in an isolated Shadow DOM. Its navigation and CSS cannot overwrite Docusaurus routes, headings or styles. The old HTML is a tested, nonpublished activity-shell fixture, not a second site.

The eight supplied PDFs are published under static/materiales/, including the assessment statement. These downloads are public on the existing public site. Credentials, model weights and raw local TTS output are not included. The examples are fictitious, not experimental evidence or medical advice.

Development and verification

Requires Node.js 20+ (CI and container builds use Node.js 24).

npm ci --ignore-scripts
npm run audit:security
npm run build
npm test
npm start

Build generates the MDX, activity styles, font files and search index. Tests cover the existing numerical engines, all lesson views, the player, seeded exercises, complete MDX content and the scoped interactive integration. DOM tests are not browser layout verification.

npm test generates the ignored lesson pages, activity shell and static resources before running the suites, so it also works immediately after installing the dependencies in a clean checkout. A prior production build is not required.

npm run audit:security rejects moderate, high and critical dependency advisories; CI runs the same check. Temporary npm overrides pin patched tinypool and serialize-javascript, plus uuid only within SockJS, until the upstream tools adopt them. Both the normal build and Docusaurus rendering with two worker threads were checked with these versions.

As of 2026-11-06, the remaining low-severity advisory is deepmerge prototype poisoning, in the SVG build tooling. Its latest release, 4.3.1, has no published patch. Track the upstream fix rather than forcing npm's suggested Docusaurus downgrade.

After changing legacy activity modules, refresh the fixture's asset fingerprints:

node data-src/inferencia-estadistica/version-assets.mjs

The legacy source/test documentation remains under data-src/inferencia-estadistica/; its former hosting instructions are historical. node data-src/inferencia-estadistica/export-lecturas.mjs still exports narration and WebVTT into the ignored _work/lecturas/ directory.

Offline lesson audio

The optional Ming audio tools prepare Spanish narration, generate and resume scene checkpoints, and assemble one WAV per lesson with measured scene subtitles. The source defaults to this repository; external Ming code, model paths and output directories are configurable.

For local commands and regenerating audio after changing lesson texts, see the Spanish TTS guide. A resumed batch reads its saved course snapshot; use a new output directory to narrate a new revision without mixing old scripts.

Python preparation and tests run without PyTorch or a GPU. Synthesis requires an external CUDA/Ming installation. Weights, environments and generated audio stay outside Git; neither the site build nor its runtime needs Python or CUDA.

Published materials and audio

Prepared MP3 files and their timing manifest live under static/audio/. Only complete section or lesson aggregates whose frozen scripts match the current course are included. The player uses audio time for playback, seeking and speed changes; lessons without audio use the estimated clock without autoplay. The visual whiteboard, progressive calculations and full scene captions share one player. Fullscreen uses the native browser API with an expanded fallback for mobile.

Refresh the published assets after more lessons finish:

node scripts/prepare-media.mjs --pdf-root '/path/to/documents' --audio-root '/path/to/outputs/inferencia-estadistica'

The preparer verifies source signatures and complete WAVs, then encodes mono 48 kbps MP3 using ffmpeg/ffprobe with one CPU thread. Those tools and local source directories are not required by the site build. Already validated assets can be retained when the source directories are unavailable. Scene boundaries come from measured audio; where phrase alignment is unavailable, cue highlighting is proportional within each scene and explicitly marked as approximate. It is not word-level forced alignment. The downloaded VTT uses the player's timeline.

The accessibility revision changes the canonical scripts. Previous incompatible MP3 files are preserved in the audio archive, outside static/, so they are not published or played. Tests reject MP3 files in static/audio/ that are absent from the playback manifest. If media preparation retains excluded older files, archive them before publishing. Regenerate audio from the current scripts before publishing.

Animated Whiteboard

All animated lessons and exercise solutions use a client-only Konva canvas with a paused GSAP timeline driven by the existing player's audio clock. Theory and figure-only lesson views do not load these dependencies. Narration follows the conversational storyboards and the questions appropriate to each lesson.

Scenes use explicit quantities, equations and plot data for seed proportions, normalization, function values, areas and resource regions; examples are not inferred from words in the narration. Worked exercises display their actual generated inputs and equations. MathJax turns formulas into vector paths within the same canvas, without image downloads or HTML formula overlays. The board reflows above the optional in-video subtitles and visible controls, without internal scrolling. Ordinary videos keep 16:9; landscape fullscreen uses the entire viewport.

tests/whiteboard.test.mjs renders every scene with a CPU canvas at desktop and mobile sizes with reserved overlay space, checks text bounds, exact areas, reversible seeking, reduced motion and resource cleanup. This is not a browser or physical-device visual check.

Deployment

Dockerfile builds and tests the site, then copies only static output into an unprivileged nginx image. Node.js, npm and the build dependencies do not run in production. Upstream dependency-audit advisories affecting Docusaurus build tools must be reviewed separately; a static runtime does not make the builder immune.

The build stage installs both lockfiles (the site and isolated Remotion package) and the Git, Python and FFmpeg tools required by the media checks. Git history and local node_modules are not copied into the image. BuildKit supplies the full SOURCE_REVISION; for a local build run:

docker build --build-arg SOURCE_REVISION="$(git rev-parse HEAD)" -t inferencia-estadistica .

The proxmox-k8s repository owns deployment, registry credentials, the public Traefik path and the BuildKit/Flux automation. No cluster credentials belong in this repository. main changes build immutable images; Flux updates their tag. The old /pages/inferencia-estadistica.html URL redirects to /inferencia/; legacy lesson fragments are mapped client-side to their new lesson URL.

The site shares only the existing hostname/TLS and simple-webs Kubernetes namespace. It has a separate repository, image, Deployment, Service, route and NetworkPolicy; content delivery no longer depends on the simple-webs checkout.

Vendored libraries and fonts retain their licenses under pages/inferencia/vendor/. KaTeX for the new site is provided by its pinned npm dependency; the historical vendored version remains only in legacy engine tests.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages