49 Analyzing each sample by summarizing its main attributes

sample_summaries <- lapply(samples, function(sample) { summary_stats <- summarize(sample, Average_Age = mean(Age), SD_Age = sd(Age), Average_Health = mean(Health), SD_Health = sd(Health), Average_TechnicalSkills = mean(TechnicalSkills), SD_TechnicalSkills = sd(TechnicalSkills), Average_ProblemSolving = mean(ProblemSolving), SD_ProblemSolving = sd(ProblemSolving) ) return(summary_stats) })

Stretch Tasks (Optional)

This section offer additional optional activities for students who wish to deepen their understanding.

# Code for further analysis goes here

49.0.1 Part 2: Analyzing Our Simulated Colonists

  1. Task 4: Descriptive Statistics
  • Objective: Learn to run descriptive statistics on our generated data and store the results.
    • Calculate and display the mean, standard deviation, and correlations for our simulated attributes.
  1. Task 5: Visualization
  • Objective: Visualize our data to gain insights into the distribution of skills and attributes within our potential colonists.
  • Create histograms, scatter plots, and correlation plots for our simulated variables.

49.0.2 Part 3: Preparing for the Unexpected

  1. Task 6: Sampling and Replication
  • Objective: Master the art of repeated sampling and simulation to prepare for various scenarios.
    • Simulate drawing random samples from our dataset to understand variability and ensure resilience in our colony’s population.
  1. Task 7: Analysis of Repeated Samples
  • Objective: Analyze repeated samples to identify patterns and potential challenges.
    • Store and summarize the results of repeated sampling in a comprehensive dataframe, analyzing the resilience of our population across simulations.

Conclusion

Summarize what has been learned in this lab and why it matters. Include any challenges faced and how they were overcome.