Skip to content

Commit

Permalink
Merge pull request #30 from 3mmaRand/feature/babs2-week1
Browse files Browse the repository at this point in the history
Feature/babs2 week1
  • Loading branch information
3mmaRand authored Jan 27, 2025
2 parents f01fb6f + afd391e commit f316ac7
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 125 deletions.
6 changes: 0 additions & 6 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ website:
page-footer:
left: "Rand, E. (2023). Data Analysis in R for Becoming a Bioscientist (Version 0.1) <https://github.com/3mmaRand/R4BABS>"
right:
- icon: mastodon
href: "https://mastodon.social/users/3mma"
text: "Emma on mastodon"
- icon: github
href: "https://github.com/3mmaRand"
text: "Emma on GitHub"
Expand All @@ -41,9 +38,6 @@ website:
- text: "PGT 52M"
file: pgt52m/pgt52m.qmd
tools:
- icon: mastodon
href: "https://mastodon.social/users/3mma"
text: "Emma on mastodon"
- icon: github
href: "https://github.com/3mmaRand"
text: "Emma on GitHub"
Expand Down
67 changes: 14 additions & 53 deletions r4babs2/r4babs2.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,9 @@ toc-location: right

# Welcome!

Welcome to an exciting six-week journey into data analysis with R!
In this part of the module, we’ll explore key concepts that are essential
for any budding bioscientist, including **the logic of hypothesis testing**,
a foundation for making informed decisions based on data and
**Statistical models** for analysing patterns and relationships across multiple
variables.

This module builds on your skills from BABS1 step-by-step, helping you gain
confidence in applying statistical tools to real-world bioscience problems.
By the end, you’ll have a solid understanding of how to analyse data to go with
your existing skills in summarising and plotting it.
Welcome to an exciting six-week journey into data analysis with R! In this part of the module, we’ll explore key concepts that are essential for any budding bioscientist, including **the logic of hypothesis testing**, a foundation for making informed decisions based on data and **Statistical models** for analysing patterns and relationships across multiple variables.

This module builds on your skills from BABS1 step-by-step, helping you gain confidence in applying statistical tools to real-world bioscience problems. By the end, you’ll have a solid understanding of how to analyse data to go with your existing skills in summarising and plottin g it.

## Module Learning Objectives

Expand All @@ -29,59 +20,29 @@ The BABS2 Module Learning outcomes that relate to the Data Analysis in R content

- Use R to perform these analyses, reproducibly, on data in a variety of formats and present the results graphically

- Communicate research in scientific reports and via oral presentation.
- Communicate research in scientific reports and via oral presentation

# How this part of the module is organised

This module is designed to help you learn as you go β€” meaning you won’t need to
spend hours revising. Instead, you’ll build skills gradually and steadily
through a structured weekly schedule that combines contact time and guided
independent study. The goal is to make learning manageable, effective, and
enjoyable.
This module is designed to help you learn as you go β€” meaning you won’t need to spend hours revising. Instead, you’ll build skills gradually and steadily through a structured weekly schedule that combines contact time and guided independent study. The goal is to make learning manageable, effective, and enjoyable.

Each week has:

- An "About" page which gives a topic summary, the Learning Objectives, and
the instructions for the week. You should read this first.

- Some independent study on the "Prepare!" page to help you get ready for
the workshop. This will be reading from the course book ([Computational
Analysis for Bioscientists](https://3mmarand.github.io/comp4biosci/)),
watching a video, or doing some coding or some set up. The preparation is
designed to take about 30-45 minutes on average. To make it more fun and
more productive, study with other people.

- A two-hour workshop using R to apply concepts you are learning. We will
usually start with a demonstration of an example from the "Prepare!" tasks.
You will spend most of the workshop diving into exercises, and building on
previous weeks’ skills while being introduced to new concepts. Anything you
have not done before is explained and guided but you will also have the
opportunity to solve problems using using the skills gained in previous
workshops on your own or with others. I often remind
you to take care of future you by making notes so you can look up your
previous work but you can also search the
[R4BABS](https://3mmarand.github.io/R4BABS/) site (search is top right).

- The "Consolidate!" page has independent exercises to reinforce what you’re
learning. These are similar to the workshop activities but with less
guidance to encourage independent thinking. Occasionally, there will also
be some reading. It is designed to take about 30-45 mins on average but may
be quicker if you understood the workshop very well or slower if you need
to revisit parts.
- An "About" page which gives a topic summary, the Learning Objectives, and the instructions for the week. You should read this first.

# Tips for Learning R:
- Some independent study on the "Prepare!" page to help you get ready for the workshop. This will be reading from the course book , watching a video, or doing some coding or some set up. The preparation is designed to take about 30-45 minutes on average. To make it more fun and more productive, study with other people.

- A two-hour workshop using R to apply concepts you are learning. We usually start with a demonstration of an example from the "Prepare!" tasks. You will spend most of the workshop diving into exercises, and building on previous weeks’ skills while being introduced to new concepts. Anything you have not done before is explained and guided but you will also have the opportunity to solve problems using using the skills gained in previous workshops on your own or others. I often remind you to take care of future you by making notes so you can look up your previous work but you can also search the [R4BABS](https://3mmarand.github.io/R4BABS/) site (search is top right).

Learning R is a bit like learning a new language, picking up a musical
instrument, or mastering a sport β€” you can’t cram it all at once. Consistency
is key. Even small, regular practice sessions are more effective than trying
to do it all in one go.
- The "Consolidate!" page has independent exercises to reinforce what you’re learning. These are similar to the workshop activities but with less guidance to encourage independent thinking. Occasionally, there will also be some reading. It is designed to take about 30-45 mins on average but may be quicker if you understood the workshop very well or slower if you need to revisit parts.

# Tips for Learning R:

- a little bit of engagement and practice is always better than none, so
celebrate bit effort!
Learning R is a bit like learning a new language, picking up a musical instrument, or mastering a sport β€” you can’t cram it all at once. Consistency is key. Even small, regular practice sessions are more effective than trying to do it all in one go.

- if you fall behind, don’t stress. Just pick up where you left off β€” there’s
no need to skip ahead. It is fine to work on a previous week’s workshop!
- a little bit of engagement and practice is always better than none, so celebrate each bit effort!

- if you fall behind, don’t stress. Just pick up where you left off β€” there’s no need to skip ahead. It is fine to work on a previous week’s workshop!

# Content

Expand Down
44 changes: 27 additions & 17 deletions r4babs2/week-1/overview.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,37 @@ title: "Overview"
subtitle: "The logic of hypothesis testing and confidence intervals"
toc: true
toc-location: right
editor:
markdown:
wrap: 72
---

This week we will cover the logic of consider the logic of hypothesis testing and type 1 and type 2 errors. We will also find out what the sampling distribution of the mean and the standard error are, and how to calculate confidence intervals.


![Artwork by @allison_horst: "type 1 error"](images/type-1-error.png){fig-alt="A cute population with a normal distribution with two samples, one which happens to have at mean at the low end of the population and one at the high end. The population is saying 'yes, I'm still sure I birthed both of you'. Because these samples are relatively rare - would happen less than 5% of the time - we would conclude they did not come from this population. That would be making a type 1 error." width="600"}


![Artwork by @allison_horst: "type 2 error"](images/type-2-error.png){fig-alt="Two cute populations with a normal distribution with very little overlap. There are two samples, one which happens to have at mean at the low end of one population and and the other at the high end of the other population so that the two samples are close togther. Deciding these two samples were from the same population would be making a type 2 error." width="600"}

This week we will cover the logic of consider the logic of hypothesis
testing and type 1 and type 2 errors. We will also find out what the
sampling distribution of the mean and the standard error are, and how to
calculate confidence intervals.

![Artwork by : "type 1 error"](images/type-1-error.png){fig-alt= "A cute
population with a normal distribution with two samples, one which
happens to have at mean at the low end of the population and one at the
high end. The population is saying 'yes, I'm still sure I birthed both
you'. Because these samples are relatively rare - would happen less than
5% of the time - we would conclude they did not come from this
population. That would be making a type 1 error." width="600"}

![Artwork by : "type 2 error"](images/type-2-error.png){fig-alt= "Two
cute populations with a normal distribution with very little overlap.
There are two samples, one which happens to have at mean at the low end
of one population and and the other at the high end of the other
population so that the two samples are close togther. Deciding these two
samples were from the same population would be making a type 2 error."
width="600"}

### Learning objectives

The successful student will be able to:

- demonstrate the process of hypothesis testing with an example
- demonstrate the process of hypothesis testing with an example

- explain type 1 and type 2 errors

Expand All @@ -35,17 +50,12 @@ The successful student will be able to:
i. πŸ“– Read The logic of hyothesis testing
ii. πŸ“– Read Confidence Intervals


2. [Workshop](workshop.qmd)

i. πŸ’» Remind yourself how to import files
ii. πŸ’» Calculate confidence intervals on large
iii. πŸ’» Calculate confidence intervals on small samples.

i. πŸ’» Remind yourself how to import files
ii. πŸ’» Calculate confidence intervals on large
iii. πŸ’» Calculate confidence intervals on small samples.

3. [Consolidate](study_after_workshop.qmd)

i. πŸ’» Calculate confidence intervals for each group in a data set



3 changes: 3 additions & 0 deletions r4babs2/week-1/study_before_workshop.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ toc-location: right

2. πŸ“– Read [Confidence Intervals](https://3mmarand.github.io/comp4biosci/confidence_intervals.html)

3. If you have not yet done so, I recommend setting up the Virtual
Desktop Service. [Instructions are in BABS1](../../r4babs1/week-6/workshop.html)


Loading

0 comments on commit f316ac7

Please sign in to comment.