zihanzhang
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: "Paper Helicopter - 2" author: 'Zihan Zhang, Yang Gao (yug61), Brain Dailey' date: 'December 13, 2019' output: pdf_document: toc: yes toc_depth: '2' --- ```{r Front Matter, include=FALSE} # clean up & set default chunk options rm(list = ls()) knitr::opts_chunk$set(echo = FALSE) # packages library(tidyverse) # for example library(mosaic) # for example # user-defined functions # inputs heli_ccd = read.delim("heliccd.txt",header = TRUE) ``` # Project Description A designed experimental study was conducted to find the optimal value for all the selected factors(wing length, body length) by the previous research analysis that significantly affect the in-air duration (response variable: time) of the paper helicopters that are designed and made by study groups in STAT470W. In order to find the optimal helicopers with the highest flight time, the experiment employed 2 factors central composite design with 13 samples to assess the response surface. The helicopters were dropped from the bridge of Huck Life Science building and the time aloft was collected in the unit of seconds. Each helicopter was dropped 3 times and the average among these 3 droppings was used in the study. The interest of the experiment was to find out the best value for each selected factor to maximize the flying time. ## Research Questions Our ultimate goal in this research is to optimize the helicopter design for the flight. We decided to figure out the exact numerical values of all the factors in this study, and find the best combination value for the factors selected by the previous analysis to maximize the in-air duration of our paper helicopter. **Question 1:** What wing length and body length combination will produce the best paper helicopter with the smallest variance between repeated measures? ## Statistical Questions *(optional)* **Question 1.1:** Which terms in the following equation would be the most crucial factors for the optimal helicopter? **Question 1.2:** $time = \alpha+\beta_1*WingLength+\beta_2*WingLength^2+\beta_3*BodyLength+\\\beta_4*BodyLength^2+\beta_5*BodyLength*WingLength$ ## Variables We have three variables of interest in this experiment: wing length, body length, and flight time(response) while holding other variables constant. There is one paper clip, 42mm body width, unfolded wings, and untapped body and wings for every helicopter in this study. All levels of the wing length and body length were generated by Minitab. | Variable | Description | Type | Levels | |--------------|------------------------------------------------------------------------------------|-------------|-----------------------------| | wing length | The length of the wing measured in millimeter. | Ordinal | 60mm;70mm;95mm;120mm;130mm | | Body Length | The length of the body measured in millimeter. | Ordinal | 60mm;70mm;95mm;120mm;130mm | | Flight Time | Response variables. The helicopter's aloft time. | Ordinal | Continuous in second. | *Table 1: The table provides information on each of the variables described including a description, type, and levels. The flight time is our response variable while wing length and body length are our explanatory variables.* # Exploratory Data Analysis (EDA) First, we checked the data: there is no missing value and the data is normally distributed(plots are in Appendix). As the key question for this analysis is about how wing and body length would affect the flight time of the paper helicopters, we first want to see the boxplots of time vs wing length&body length: ```{r boxplots,echo=FALSE} par(mfrow=c(1,2)) boxplot(time~winglength, data = heli_ccd, main = " Flight Times for Different Level of Wing Lengths") boxplot(time~bodylength, data = heli_ccd, main = " Flight Times for Different Level of Body Lengths") ``` *Figure 1: Boxplots shows the time aloaft at each level of wing&body lengths* For wing length, there is a strong positive linear relation and no outlier has been detected. For body length, we do not see a clear linear relation from the plot where the time did not change significantly with body length. However, there are some outliers. Next, we wanted to check the pareto chart to get a preliminary look of the main effects and interaction effects from the data. ![](/Users/zzh/Desktop/stat470/case3-2/pareto_plot.png) *Figure 2: Pareto Chart of the standardized effects($\alpha = 0.05$)* As we assumed, the pareto chart shows the main effect of wing length dominated the flight time. Body length and other interaction were not significant. Overall, we could say that wing length is positvely correlated with the flight time from EDA. # Statistical Analysis To answer the research question on how to improve the paper helicopter's performance, we first needed to fit a model for our variables and here is the table for the coded coefficient and p-values: |Term |Coef |P-Value| | ------- | -------| ------| |Constant |4.792 |0.000| |wing length| 0.904| 0.000| |body length| -0.051 |0.687| |wing length*wing length | 0.084 |0.663| |body length*body length| -0.196 |0.326| |wing length*body length| -0.405| 0.141| *Table 2: Coded coefficient for the Fitted model* Regression equation in uncoded units: $time = -1.23 + 0.0435 wing length + 0.0591 body length + 0.000067 wing length*wing length - \\0.000157 body length*body length - 0.000324 wing length*body length$ Wing length is the statistically significant variable in this model with a p-value closes to zero. From the uncoded equation, we noticed that the coefficients for wing length and wing length square are positive which means while holding others constant, longer wing length would generate higher afloat time. Even though the p-value for body length is not significant, we still need to consider the effect of body length: the coefficient for body length is 0.0591 and body length square is -0.000157. The later term would dominate the effect of body length since as body length gets larger, the square term would get very large. Therefore we can conclude that the body length is negatively correlated with the flight time. ![](/Users/zzh/Desktop/stat470/case3-2/contour_plot.png) *Figure 3: Contour plot for time* As shown in the plot, the longest flight time appears on the top left corner where the wing length is at the maximum value(130mm) of this experiment and body length is the shortest around 60mm. However, we noticed that the flight time did not increase much with a decreased body length especially when the wing length was short (smaller than 100mm) according to the contour plot. We suspected whether the body length was significant or not for the flight time. ![](/Users/zzh/Desktop/stat470/case3-2/contour_plot_sd.png) *Figure 4: Contour plot for standard deviation* We can see here that the combinations with the lower sd have low values on both wing and body lengths. The bottom right and top left corner have the highest sd which means when one of the variable is high and the other one is low, it would variate the most. ![](/Users/zzh/Desktop/stat470/case3-2/interaction_plot.png) *Figure 5: Interaction plot* The interaction plot shows that when the wing length is short, higher body length would increase the helicopter’s in-air duration whereas with a longer wing length. However, the best performance helicopters always have the longest wing length and it’s appropriate to choose a longer wing length for the optimal helicopters. ![](/Users/zzh/Desktop/stat470/case3-2/optimization_plot.png) *Figure 6: optimization plot based on the ccd design analysis* According to the optimization plot, our maximized flight time would occur when the wing length equals to 130 mm and body length equals to 60mm. However, as we discussed previously: a high wing length with low body length would generate relatively high variance. We decided to focus for the highest mean flight time rather than lower the variance since we could not achieve both goals with the data we had. It's worth to note here that the given values in the plot may not generate the highest flight time among all of the possible combinations since the data did not capture the vertex of the response surface. Therefore we needed to be prudent because it's unlikely that the flight time will increase steadily as we increase the wing length. Our final helicopter was designed based on the 13 samples. # Recommendations ### Research Question **Question: What wing length and body length combination will produce the best paper helicopter with the smallest variance between repeated measures?** In summary, based on the analysis, the final optimal helicopter should be designed in the following way: |Term |Coef | | ------- | -------| |wing length| 130mm| |body length| 60mm| |paper clip| one| |taped wings| no| |taped body| no| *Table 3:the final values for the optimal designed paper helicopter.* # Resources ## Tools and packages R is used to clean the data and do basic mathmatical calculation. The functions can be used to reproduce the result. The code used to transform the data and the outputs from analysis are provided in Appendix D. The open source R software can be downloaded via the link: https://www.r-project.org Minitab is used to generate plots on the EDA part and analyze the data. The functions can be used to determine which level of resolution are possible with our study. The open source Minitab software can de download via the link: https://www.minitab.com/en-us/ ## References and Resources RStudio Team (2015). RStudio: Integrated Development for R. RStudio, Inc., Boston, MA URL http://www.rstudio.com/. Olawoye, Babatunde. (2016). A COMPREHENSIVE HANDOUT ON CENTRAL COMPOSITE DESIGN (CCD). https://www.researchgate.net/publication/308608329_A_COMPREHENSIVE_HANDOUT_ON_CENTRAL_COMPOSITE_DESIGN_CCD Contour Plot, NCSS Statistical Software, Chapter 127 URL: https://ncss-wpengine.netdna-ssl.com/wp-content/themes/ncss/pdf/Procedures/NCSS/Contour_Plots.pdf Pareto Chart Basics, Minitab 18 URL: https://support.minitab.com/en-us/minitab/18/help-and-how-to/quality-and-process-improvement/quality-tools/supporting-topics/pareto-chart-basics/ # Additional Considerations There are several additional considerations regarding this study, its results, and its scope of inference. First, it is important to note that the paper helicopter data used to complete this analysis was not collected with the specific goal of answering our research questions. Though the statistical analyis was completed based on a subset of the data and the conclusions were appropriately drawn based on those outputs, it is important to note that the data used in the analysis was not initially meant to answer the two research questions of interest. In terms of limitations to the recommendations, first of all, the sample size was small and the data was collected only from our own experiment in one location. In this time, our sample size was even smaller that there were only 13 samples in our sample set. This may make our sample not be representative of the entire paper helicopter population. Second, when designing the experiment, we only concerned about how to change the selected factors' values to increase the in-air duration but unable to reduce the variance at the same time. Therefore, even though the longest in-air duration for our optimal designed paper helicopter is good enough(2nd place among the 8 groups), the variance (0.612) of 4 repeated droppings is kind of high when comparing it with other groups. This may make the average value vary too much. In the future, there is certainly more opportunity to find the optimal values for selected factors to cause the flight time of paper helicopters longer. If the prerequisites allowed, paper helicopters with longer wing length could be used in the experiment. According to our optimization plot (Figure 4), we did not find the vertex for the wing length curve. With the data gathered from the paper helicopters with longer wing length and coresponding body length in the combination, there would be the opportunity to have a much wider and clearer view of the dataset and conclusions that can be drawn from it. # Technical Appendix **Assumptions check:** ```{r datadist,echo=FALSE} hist(heli_ccd$time) ``` *Figure 7: the histogram to check the assumption* According to the histogram, we can claim that our data is normally distributed. ```{r normality,echo=FALSE} mod = lm(time ~ .^2+I(winglength^2)+I(bodylength^2), data = heli_ccd) par(mfrow=c(1,2)) qqnorm(mod$residuals,main = 'Residual Normality Plot') plot(mod$residuals,main = "Residual Plot") ``` *Figure 8: the residual plot to check the assumption* As the residual plots shown, the normality assumptions are met and there is no trend. The variance seems constant **Raw Data** ![](/Users/zzh/Desktop/stat470/case3-2/rawdata.png) *This is the raw data with 13 samples we used in this study.* ### R Script #### Most of the analysis used Minitab built functions. We only used R for boxplots and assumption checking. ```{r ref.label=c( 'Frong Matter','boxplots', 'datadist', 'normality'), echo=TRUE, eval=FALSE} # Reprinted code chunks used previously for analysis ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully